Login hooks.

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.
Merge remote-tracking branch 'upstream/devel' into login-hooks
Clone the attempt object passed to login hooks, so the original can't
be modified by hook callbacks.

Give the Hook constructor a named option to debug print and ignore
exceptions, as just passing in a string argument to do that wasn't
very clear.
Drop `knownUserId`.

This comes at the expense of the password login methods which now need
to explicitly return the user id with errors, but makes for a less
confusing flow of control.
Misc login hooks code review items
Be extra careful that password reset tokens are one-time use.
Fix call to Hook constructor in livedata
Limits in oplog code

- distinguish queries with limits and sorts
- separate the concept of matching set from published set
- keep a separate buffer for N documents outside of limit to reduce mongo
  lookups
Always use limit to separate ordered code vs unordered
Export sorter in Minimongo namespace
Fix Dummy Structure

actually Dummy-structure was supposed to be so dummy, it would be trivially easy
to write a bug-free 20-line code for it. But I failed. To dummy structure...
Correctly distinguish queries with limits and sorts
Fix typos
Typo + always use inequalities with C-style comparators
A simple test for limits

and it does pass!
More tests on updates. Clarifying comment
wip test
Fix the test on limit-requery ; keep docs in _published and _unpublishedBuffer consistently w/o _id
wip fixing the appends to buffer
wip changed published document can go into buffer