Release in `Locker.lock` only on local failure.

Back to running cleanup functions for exceptions thrown from user land,
but it is still not testable. Handling user land exceptions has added
additional conditions in `Locker.lock` to determine if lock cleanup is
required, or if the error handling is from an exception that was raised
after the lock was successfully obtained.

See #273.