Adds `Accounts.validateLoginAttempt`, `Accounts.onLogin`, and
`Accounts.onLoginFailure`.
The process for logging in a user is consolidated in accounts-base,
which is now the only package which directly accesses login tokens in
the database.
All login methods now go through `Accounts._loginMethod`, which
ensures that exceptions are captured and login hooks are called in all
cases.
The callback hook implementation code from livedata is extracted into
an internal `callback-hook` package, where it can be used by accounts.
This is less efficient, as we don't actually need to compute it every time.
However, I think this is pretty small compared to the other work we're doing
(string splitting via regexp, string copies, etc).
This makes the code clearer and easier to understand, as all the code is in
one place. Also, it was distracting at the top of the file as it came before
the commit saying what was in the file.