Introduce Alembic for H

It'll be used for migrating our user db, upgrading structure changes

This commit contains the basic architecture and the updated requirements.
Alembic new migration file: user subscriptions

The upgrade part created the user_subscription table and alters the user table to add the subscriptions column.
The downgrade part drops this new column and this new table
Alembic uses postgresql connect string

We're using a postgresql user db in the production and also currently alembic has issues with adding a new column for an existing table for sqllite
Add alembic settings to development.ini and setup.py

By default alembic creates its own ini file, but with the -c flag any ini file can be used.

New section added: alembic
New log section added: alembic
Move alembic scripts to h.migrations
Merge pull request #1081 from hypothesis/1078-set-up-alembic-3

1078 set up alembic
Update development.ini alembic config

I forgot to do this when I moved the scripts.
Add V1 viewsort feature.

The viewsort feature allows users to better control the annotations that appear in the sidebar. The view control allows users to select either SCREEN (in which the sidebar only displays annotations that are currently visible on screen) or DOCUMENT (All annotation on the page are visible in the sidebar). The sort feature allows users to sort annotations by newest, oldest, or location (where they fall in the document). Both controls are implemented in simple tabs below the topbar.

The sort feature is implemented using Angular's very useful OrderBy attribute on ng-repeat.

The view control is implemented using updateviewer.
PEP8 and import cleaning
readability++ and expected_conditions in test
Change CSS according to Randall's suggestions.
Email notifier code improvements

The email notifier was already using email templates for various types of email notifications but these templates had redundancies and the subject field was not generated from a txt chameleon template.

Now, the following improvements has been done:
- NotificationTemplate class is a common superclass for all our current- and future email templates.
- ReplyTemplate, and CustomSearchTemplate classes are inherited from the NotificationTemplate, thus becoming shorter
- The subject fields are also txt templates (before that they were generated from the code)
- Import ordering has been fixes for style
Merge pull request #1083 from hypothesis/email-notifier-improvements-2

Email notifier code improvements
Merge pull request #1084 from RawKStar77/viewandsort

Add V1 viewsort feature
Start to factor out cross-cutting drafts concerns
Introducing email notifications to page owners.

This commit introduces a new email-notification template, called: DocumentOwnerTemplate and a new consumer for our AnnotationEvent domain_notification

Description:
- The code is in a separate file, called: domain_mailer.py + 2 template files for the notification template.
- These 3 files can be always moved out from our h project and use h as an import.
- Only this part of the code uses requests, and BeautifulSoup4, so requirements will be obsolete once we move this component to a separate repo.
- For every newly created annotation we download the web page where it is created, and if needed we reparse it to look for link tags with rel='reply-to' property, to identify the document owners.
- If the email's domain match the pages domain: we send an e-mail notification to that page owner
- The DocumentOwnerTemplate has its subject and body in a separate txt template, as usual, so easy to change it.
- Currently we're not doing any caching, this will be subject to later performance improvement PRs
Add BeautifulSoup and requests to setup.py
Merge pull request #1085 from hypothesis/email-document-owner-notifications

Introducing email notifications to page owners.
Fix for setting up the initUpdater in the AppController

In the previous implementation we did a really unnecessary string conversion.

This solution is shorter and cleaner.
It does fix #1065 however it does not solve the underlying discussion about the document plugins unencoding.
Don't add a terminating slash to the base URI

Only replace extra slashes with a single slash.