[bugfix] don't circumvent release when count > 0

release callback is _not_ per object, but per user (previously
mistaken).  Now check for count > 0 is done after release callback is
called.

The callback exists so that the registry finds the registry object and
calls the callback while the registry is locked.  Still, it's a
per-detach call, not per-delete.

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>