Bug 578653 - Support saving certificates as profile-scoped preferences

Refactor CertificateChecker to implement
persistTrustedCertificatesInTrustEngine which will update the collection
of certificates that need saving by removing the ones it successfully
saves to the trust engine.  Then provide persistTrustedCertificates
which will save the remaining ones to the profile scope and
getPreferenceTrustedCertificates provides access to this collection of
certificates.  These are then used when deciding if a signed artifact is
signed by any certificate that is either rooted in the trust engine or
is a member of the collection of persisted trusted certificates.

Enhance TrustPreferencePage such that it supports both keys and
certificates and appears very similar to the TrustCertificateDialog.

Change-Id: I57d86a3c2b0b536033f2f21faa850d75478975c8
Signed-off-by: Ed Merks <ed.merks@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/equinox/rt.equinox.p2/+/190615
7 files changed