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

I think this creation and the following test of this var isn't really appropriate for this test: `origKeyStoreKey` is not serving any purpose to the greater test.