Fixes #94 : Make sure we replace rows in specific tables

These include accountResetTokens, passwordChangeTokens and
passwordForgotTokens. All should only have one row per account.
Declare exit handlers for SPs with transactions

We also need to resignal the error back to the client since
otherwise the ROLLBACK consumes/masks the error and the client
thinks everything was okay.
Add tests to make sure certain tokens are replaced

For accountResetTokens, passwordForgotTokens and passwordChangeTokens
we only allow one per accounts.uid and therefore when a 2nd one is
inserted it should be replaced instead of in addition to the first.
These tests make sure that this happens correctly.