smalloc: check if object has external memory

Add API and tests to check if an Object has externally allocated memory.


I'm hoping in the future Node's API can being to accept more than just Buffers. Instead it'll work with anything that has externally allocated memory, ArrayBuffers, etc. Since there's no way to do this from JS, this is the quickest way I could think of.