Reworking clearPasscodeState to behave as a synchronous, non-UI method