Fix Darwin build.

OS X doesn't provide malloc_usable_size() but malloc_size() instead.
Also include <malloc/malloc.h> instead of <malloc.h> on this platform.

+ Factor the detection/declaration of USE_MALLOC_USABLE_SIZE in
  a header to avoid repetitions.

Change-Id: Id9a391f07b14a2459a3fe510c89ad52ba4d3a3fd
5 files changed