MB-11305 Ensure that realloc isn't called with zero size

realloc() with a size of zero is undefined according to ISO C [9899:2011]. Assert that the size is non-zero.

Change-Id: I4069675a73d13d06e324d8aa43ff213ec107bbd4
Reviewed-on: http://review.couchbase.org/37963
Reviewed-by: Trond Norbye <trond.norbye@gmail.com>
Tested-by: Trond Norbye <trond.norbye@gmail.com>