Fixed an Issue with the last unlock code

The Unlock code would re-appear after the unlock time expires and
sometimes would put the box in an unknown state. This has been fixed in
this commit by simply re-initializing the entry_code, display_str and
digit_count variables to 0 after a valid code has been entered.