Email - Part 1

Work in progress.

Read #2312. 

> Send verification email on email add/change
> Add new page for verifying email.

Once this is merged, existing users will be able to add a verified email to their Gratipay account.

- [x] Add emails table.
- [x] Create a verification endpoint. Check for correct hash, and time <  24 hours(?).
- [x] Add UI to show verification status on account page
- [x] Add resend verification email button, and corresponding notifications
- [x] Create mandrill test key for Gratipay (need help here)
- [x] comprehend security concerns wrt injection into email templates
- [x] send notification to old email address
- [x] standardize on nomenclature: "confirm" vs. "verify"
- [x] i18n for emails (skip for now)
- [x] i18n for callback (skip for now)
- [x] review and improve success/failure messaging on callback
- [x] add uniqueness constraint to email address
- [x] ~~use `email` instead of `email_address`~~ ([ref](https://github.com/gratipay/gratipay.com/pull/2752#discussion_r21167466)) [IRC](https://botbot.me/freenode/gratipay/2014-12-04/?msg=26815042&page=1)
- [x] sort emails ~~by status (primary, verified, unverified) then alphabetically~~ ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65260156))
- [x] record status switches in events ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65262062))
- [x] allow to hit enter when entering an email address ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65262652))
- [x] throw "already attached" error when first adding an email, not just when verifying (but also throw it then, of course) ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65263406))
- [x] fix bug with account merging ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65264037))&mdash;#2981
- [x] decide if we actually have a sign-out bug on this PR ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65264899))&mdash;reticketed #2991
- [x] ~~allow user to dismiss email cta permanently~~ ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65270260)) [IRC](https://botbot.me/freenode/gratipay/2014-12-04/?msg=26815102&page=1)
- [x] make sure we're going to be able to pledge to emails with this schema ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65477289))
- [x] confirming a second email address shouldn't change which is primary ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65260827), [ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65833241))
- [x] verification should land me back at `accounts/#email` with a notification rather than a separate page that is two clicks from where I started ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65262377), [ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65838939))
- [x] merge emails during account take over ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65839242))
- [x] connecting the same address twice should say as much (currently says "connected to a different account")
- [x] "Success" and "Failure" notifications are too generic. Let's be more specific.
- [x] text/plain messages have too much leading whitespace ([IRC](https://botbot.me/freenode/gratipay/2014-12-05/?msg=26908437&page=3))
- [x] don't choke on verification of email addresses with a `+` in them. ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-66148857))
- [x] adding an already-added email shouldn't refresh page ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-66152053))
- [x] is there a bug re: one non-primary account? ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-66164932))
- [x] make me sign in to complete verification ([ref](https://github.com/gratipay/gratipay.com/pull/2752#issuecomment-65883752))
- [x] add a "Resend verification email" button to the Verification Failed page ([ref](https://botbot.me/freenode/gratipay/2014-12-08/?msg=27071297&page=2))
- [x] make sure we're sending a notification to the old address

After this is merged, we'll have to:

- [ ] Utilize ~~the elsewhere email addresses and~~ ([ref](https://github.com/gratipay/gratipay.com/pull/2752#discussion_r21167175)) those in the `email` column to send initial verification emails&mdash;this is in `branch.py`.
- [ ] Delete the `email` column once the above step is done.
[IRC](https://botbot.me/freenode/gratipay/2014-12-09/?msg=27134682&page=1)