In init_application, as soon as we have mongo details, force a (re)connect.

This is so that it's possible to switch_to_test_mode() properly. If we don't do
this, the app.db handle is correctly pointed to the test db, but mongoengine's
handle is NOT (the one in mongoengine.connection._dbs), leading to imminent
madness.
Typo that pycharm was bugging me about.
Insert a reasonable sender for sendgrid mail objects.