Add ability to finish() ConfirmDeviceCredential if it loses foreground

If user enters face settings but does not enter the password, then
turns off the screen, it's possible the challenge is invalidated. Instead,
we should finish() the device credential screen as well as FaceSettings.

This prevents
1) The user from being prompted for credential with lack of context
2) Credential returning a HAT that wraps an invalidated challenge

The user will be returned to the security settings screen, where they
have more context and can decide if they want to enter face settings again.

Fixes: 138273242

Test: 1) Open face settings, do not enter password
      2) Press power button
      3) Unlock keyguard
      4) User is not presented with credential screen
Test: Go through SUW, turning on/off the screen at various security
      screens. Able to enroll successfully

Change-Id: I3c3d4600138012821bb0eea7d2927df00011cdb0
5 files changed