Defines API for #173: Add configurable inactivity locking
Changes implementation to use Preconditions more often.

Change-Id: I6150d8ff4eef5369637558c38b364520c65ec64c