Fixed compile errors and added a bunch of unit tests for SalesforceSecurity library.

We should also verify here that `key.encryptionKey` and `passcodeEncKey` are the same.  It would also be good to test that `origEncKey` was *not* migrated to the passcode store, and that it *is* accessible (and equal) in the generated key store.