Add reallocarray(3) from OpenBSD

Add local improvements, use __builtin_mul_overflow if possible (GCC >= 5.0)

Improve malloc(3) with information from malloc(3) from OpenBSD