api consistency between acquire and release

Adds an optional callback function for release, notifying
if release is called multiple times for the same connection.