Keep track of the full registry path (including the root key) in
currentKeyName. This makes the error messages more informative.
Reduce the number of global variables used by openKey() & co. Only
use one variable, currentKeyHandle, to indicate whether a key is
currently open or not.