Ability to unsubscribe from notifications

Big PR, sorry for that.

Contents:
- notifier code refactoring (100% backend)
   - All notifier related code (including the domain_mailer) was moved into a separate directory (notification) (bit similar to auth). Will be very easy to factor out into a separate repo later.
   - DeOOP notification templates. The previous solution used classes with ugly static methods. (As @tilgovi said in the past it was overkill). Got rid of them. Every notification template has its own module.
   - Introducing Subscriptions table instead of the UserSubscriptions table (was formerly part of the auth module)
   - notifier fully uses subscriptions table
- Notifications tab for account settings
   - The user accounts now has a notification tab, which displays the notifications and the user can activate/deactivate them.
   - And the backend actually sets the active flag for them. (as @tilgovi suggested)

What's left:
- style the notifications tab
- put the deactivate notification url at the end of the generated emails
- rebasing and squashing the commits and write proper commit messages for them
- add new test cases
- write the migration scripts (which adds the reply notification for all existing users)


<!---
@huboard:{"order":8.71875,"milestone_order":1580,"custom_state":""}
-->

I can just drop it by hand.
On Nov 4, 2014 3:45 AM, "gergely-ujvari" <notifications@github.com> wrote:

> In
> h/migrations/versions/209c3cd1a864_change_usersubscriptions_table_to_.py:
>
> > +        sa.Column('id', sa.INTEGER, primary_key=True),
> > +        sa.Column(
> > +            'username',
> > +            sa.Unicode(30),
> > +            sa.ForeignKey(
> > +                '%s.%s' % ('user', 'username'),
> > +                onupdate='CASCADE',
> > +                ondelete='CASCADE'
> > +            ),
> > +            nullable=False),
> > +        sa.Column('description', sa.VARCHAR(256), default=""),
> > +        sa.Column('template', template_enum, nullable=False,
> > +                  default='custom_search'),
> > +        sa.Column('active', sa.BOOLEAN, default=True, nullable=False),
> > +        sa.Column('query', JSONEncodedDict(4096), nullable=False),
> > +        sa.Column('type', type_enum, nullable=False, default='user'),
>
> Just for a very temporary time, but our prod db has that table (for now).
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/hypothesis/h/pull/1580/files#r19797957>.
>