Cleanup locks after releasing

This adds a little more logic to the SQLDB locks, allowing them to cleanup after themselves upon releasing.
They will grab another lock before deleting to ensure that a chance is given to someone waiting for the lock to grab it. Deletion is not retried since it's assumed that the next owner of the lock will delete it later.
one other way to do this could be to just wrap the method call in a loop and have it spin until this condition doesn't happen. the external interface is blocking anyway