DPMS: Fix access control check for password sufficiency

Fix access control check for isActivePasswordSufficient, such that the
DPC can call it on the parent profile DPM instance.

In Change-Id: I97ca0d40a01673939e64c23f357fc38ca5427a8f an additional access
control check was imposed as a result of a refactoring.

That check required the caller to hold the cross-user permission (which
is a system-privileged permission) to check password sufficiency.

This is fixed by introducing an uchecked internal variant of the
method for getting password metrics, since caller authorization is
checked prior to calling it.

Bug: 173484959
Bug: 173483046
Test: atest com.android.cts.devicepolicy.ManagedProfileTest#testDevicePolicyManagerParentSupport
Test: Manual, created a work profile with a google.com account.
Change-Id: Id23a8d9e70c1b438fc12cb3ea408273964dde97b
(cherry picked from commit 7672301be44a2820683098e91998b93c56e2e45a)
1 file changed