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

Another "multi-property key check" candidate.