Log more important events.

Events:

* complete_reset_password:link-damaged
* complete_reset_password:link-expired
* complete_signn_up:link-damaged
* confirm:too-many-attempts
* confirm:resend
* confirm_reset_password_resend
* login:canceled

Other infrastructure:

* Add metrics.js-toErrorEvent to generate event log strings for errors.
* to base.js, add logError and logEvent as simpler APIs to log events.
* to app/tests/lib/helpers.js, add isEventLogged and isEventLoggedAtIndex
* Update tests to check for new events and make use of new test helpers.
fix(client): `service` comes from the `service` search paramter, not `sync`. Thanks @pdehaan!
fix(test): Fix a lint error.