Fix a threading bug in passphrase callback support for context objects.

Also add a bunch of unit tests for loading and dumping private keys with passphrases.
5 files changed