xmalloc : Added special case for size == 0.
Forgot sizeof(int)...
Malloc doesn't always return NULL.

This is not part of the C standard and glibc behaviour actually differ.
Added a wrapper for realloc
xmalloc: refactored tests.