Minor refactoring of the gen_ets_ns behaviour
Implement gen_ets_ns behaviour notify/4

The notify/4 when_destroyed feature is used by the drv database
implementation to ensure the leveldb handle is destroyed before
returning to a destroy/1 caller.  This is necessary to prevent a race
condition with an attempt to re-open the same database (before cleanup
has finished).

This feature would be useful for the nif database implementation as
well.  Unfortunately, the nif implementation relies on reference
counting and this doesn't allow lets to easily to take advantage of
this new feature.  This feature when made available in the lets API
would allow a calling application to use this feature.
Refresh edocs