smalloc: check if object has external memory

Add HasExternalData API to check if Object has externally allocated
memory, and accompanying tests.
doc: fix few smalloc entries for proper formatting