Fix a regression in the "Login Management" module introduced by r251242 in
which choosing to cancel the manual input of expiration time (in seconds
since the UNIX epoch) for either account expiration or password expiration
would see the original value lost.
Track defaultitem in the password and account expiry menus; if the user
presses ESC or chooses Cancel/No in any of the sub-menus, we want to return
to the expiry menu with that item selected.
Check for ESC as a separate choice from "NO" when asking if the operator
would like to disable password management for an account while adding either
a user or group. When being prompted to answer questions while adding a
group or user, two things are trow:

1. You can hit ENTER to blast through all the questions and in the end, the
   group or user is created with sensible defaults for all values.

2. You can press ESC during any prompt to cancel the operation as a whole.

This fix is shoring up an inconsistency in the latter (#2).
Fix a regression introduced by r251544; if user chooses "NO" when being
asked if they would like to disable password authentication for the account,
loop back to prompt them for the password again.
Update locking scheme, mostly transition from sched_lock.