smalloc: Allow a NULL and empty Buffer in Alloc.

This re-allows creating a NULL Buffer when there is no risk of
dereferencing it in JS land (or anywhere else).

It is required by the ref module, which has a NULL "pointer" constant
and also can read an arbitrary "pointer" (Buffer), NULL or otherwise.