[PATCH 6/9] internal: Add helper macro for checking multiply and add overflows