Move button construction out of pluginInit
Move plugin buttons within instance context

This makes it possible to call instance methods on the current plugin
from event handlers, without the additional indirection through
window.annotator.
Simplify setVisibleHighlights function

setVisibleHighlights was previously two methods disguised as one, behind
the "notify" parameter. This commit moves all the code related to
actually changing local state into the onSetVisibleHighlights handler,
making the setVisibleHighlights function responsible solely for firing
the event.
Guest#setVisibleHighlights will always toggle highlights
Merge pull request #1622 from hypothesis/simplify-highlights

Simplify highlight visibility toggling.
Handle undefined data on 'auth' event for AuthAppController

When switching tabs on our /login route, the scope.on 'destroy' is
fired in the AuthController which emits an auth event with undefined
data value.

Our AuthAppController was trying to check the data.userid for this
undefined value. We only need to do that when data is undefined.

Fixes #1627
Remove elide filter

This was only used by the old (non-unified) stream template.
Update d-t-m to 2d3cac89 (master branch)

Kill console log messages.
Style the deleted annotation message
Merge pull request #1630 from hypothesis/fix-deletion-placeholder

Style the deleted annotation message
Update selectedAnnotations at annotationUpdate event

If we got annotations selected in the sidebar and delete one, the filter
doesn't get updated. Alas, if we delete the last selected annotation then
the sidebar will show zero annotations but the filter will still say:
"Showing x annotations..."

This fix gives a new listener to the annotationDeleted event and properly
updates the selected annotation dict and count if needed.

Fix #1591
Merge pull request #1635 from hypothesis/1591-clear-filter-if-selection-is-empty

Update selectedAnnotations at annotationUpdate event.
Add Jinja2 as the project templating language
Move inject variables into layout
Add a include_raw Jinja extension

This allows us to include raw files directly into templates without
them going through the Jinja processor.
First pass at converting templates to Jinja

Most content is now correctly using Jinja but the rendering in the
sidebar is not working correctly.
Don't insert the ng-csp attribute if unset

Angular will not load correctly if this attribute is present but empty.
Move all angular templates into a client directory
Update the auth template to use Jinja
Remove the home template as it's no longer used