Made instance variables final where possible, mode protected variables
package private so that compiler will help limit state access/mutation.
Made methods only used by ResourceLocks package private to guarantee it
isn't used from elsewhere.
Made add/remove lockedObjectOwner synchronized, since it's invoke
outside of ResourceLocks.
Made LockedObject shared variables volatile.
Removed TODO comments.
Made DoUnlock state variables final so that we can be more certain the
execute method does not need to be synchronized.
Reduced mutability and visibility of shared state to help determine what
methods need to be synchronized.
Made shared mutable state volatile.
Made ResourceLocks#checkTimeouts synchronized.
Removed unused variable from DoLock.
Made immutable state variables final in DoLock. DoLock#execute will need
to remain synchronized as there are *lots* of shared mutable state.
Log instead of printStackTrace() on LockFailedException in
DoUnlock#execute().