EncryptedDatabase Revamp

Hi,

This pull request is a re-implementation of EncryptedDatabase; it does the following things:
* Simplify the encrypted database's API/usage; see TSEncryptedDatabase.h for details on how it works
* Add some error handling (for example when a wrong password is entered or when DB creation failed)
* Add the ability to "lock" the DB (ie. require the user to enter their password again) 
* Limit the back and forth between Cryptography.m and EncryptedDatabase.m that made some of the code difficult to follow. This also results in a simpler API (less public methods to expose)
* Try to follow the coding style guidelines as much as possible
* Add some unit tests; they should pass on both the simulator and a device. I had to remove the previous Test target as it wasn't building at all.
* Modify the pod configuration so that the Test target builds
* Add a "run script" build phase to the Test target in order to sign the test code so that it can access the App's keychain when run on a device.

This pull request doesn't address the following things:
* UI changes to properly react to DB errors such as:
    * Asking the user to re-enter their password if a wrong password was supplied
    * Taking actions if the DB creation failed or if the registration server could not be reached
* Code to lock the DB after X minutes.
* Probably a few other things...

Let me know if you have any questions