Split the crypto module out into two backends.

- One for X.509
- One for GnuPG (as yet unimplemented)

For consideration by @laarmen.