memory: simplify realloc a bit.

Now that we check explicitely for num_bytes == 0, we can drop the secondary
check at the end of the realloc and simply fail on NULL.