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

Please use `YES` and `NO` for boolean values.