Added CodeAuth plugin, which can expose user authentication functions from the host/guest side

If you load this plugin (which is disabled by default), these methods
can be used for integrating H login mechanism with code living
on the host page:

 * annotator.getLoginStatus()
 * annotator.loginWithUsernameAndPassword(username, password)
 * annotator.logout()
 * annotator.registerUser(username, email, password)

These all return promises.

Furtheremore, the following events have been introduced:

 * annotatorLogin, upon successfull login
 * annototorLogout, upon log out

Note: these events are *not* fired in cases when the events were
triggered by a call from the given host/guest-side annotator instance;
use the promises to react those events. The events only happen if
these events were triggered from the sidebar, or from other host/guest
frames.
Merge pull request #903 from hypothesis/882-login-from-code-3

CodeAuth plugin (user authentication functions for host side)