p11_child: prefer better digest function if card supports it
To improve FIPS compliance and security in general p11_child now checks
which message digest functions (hashes) are support for RSA keys and
tries to use the highest bit length supported.
For EC keys sha512 is used unconditionally.
Related to https://pagure.io/SSSD/sssd/issue/4039
Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>