Password constraints cleanup.

1. PasswordMetrics now doesn't have 'quality', it is only used inside DPMS.
   This allows easier and unambiguous comparisons.
2. Password complexity code reworked.

Future work: factor validation code into a android.app.PasswordPolicy class
to make PasswordMetrics just represent metrics. It is still used in two ways:
specifying an actual metrics and specifying a minimum metrics for comparison,
this will be addressed later.

Test: atest com.android.cts.devicepolicy.PasswordComplexityTest
Test: atest com.android.cts.devicepolicy.MixedManagedProfileOwnerTest#testResetPasswordWithToken
Test: atest FrameworksCoreTests:PasswordMetricsTest
Test: atest FrameworksCoreTests:PasswordPolicyTest
Test: atest com.android.cts.devicepolicy.ManagedProfilePasswordTest
Bug: 138375712
Change-Id: I8ad55f373712ac1dc8343f8cbae23ebb1efe78b9
11 files changed