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

Should probably validate the key contents here too.  We could probably create a (small) helper method to blanket test the different expected states in these scenarios, across tests.