[9.18] Prevent integer overflow when allocating arrays
Ensure that the size calculation does not overflow when allocating memory for an array.
Add ISC_OVERFLOW macros for checked arithmetic operations. Use them to implement isc_mem_callocate(). Use isc_mem_callocate() where appropriate.
Closes: #4120 (closed) #4121 (closed) #4122 (closed)
Partial backport of !8007 (merged)
Edited by Ondřej Surý