Test for the right key when overriding the mailer function.

Otherwise, it makes it very hard to configure emails properly.

Change-Id: I9ff946672898452819f150c610299f94a32aa78b
Shrink the verification code.

128 bits of random are more than enough for our purposes, and result
in a much more manageable link in the emails.

Change-Id: Iea74f085e0f0fe68fcd9ebb4c785d619d77fb7c0
Construct the email in a more input tolerant manner.

The built-in email package provides us with some protection against
the fact that we're sending emails to otherwise unchecked addresses
from users.

Change-Id: I2861c13e47291446de6158a3612804d9b7a5da90