various two factor auth improvements

(not to be merged yet)

* [x] implement TOTP checking in postgres
* [x] move two factor auth verification to postgres
* [x] remove the frontend's direct access to read TOTP secrets, but still let it set them
* [x] require 2fa at the database level for protected actions like login, withdrawal and turning off 2fa
* [x] create the tables for two factor auth recovery tokens
* [ ] create the functions for two factor auth recovery tokens
* [ ] create the frontend for two factor auth recovery tokens
* [ ] make the tests pass
Yeah, you are right, the reference implementation uses int. There is no need for any more than 8 character decimal numbers.