Change AbstractFactory to allow dynamic creation.

For the keymaster0 adapter we need to be able to select during adapter
creation time which factories to create.  This will allow selction of
RSA and ECDSA key factories which support selective delegation of
operations to a non-default OpenSSL/BoringSSL ENGINE.

Cherry-picked from internal.

Bug: 20912868
Change-Id: I925f0406c5b2443ff973b7fdfd37eba7ca2edf85
2 files changed