Move API to normal Rails

While hexagonal architecture is fine in principle, the complexity of the abstraction was getting in the way of delivering important bugs/features, namely:

- Queuing on the notification side of things - our external API partner typically returns a response in ~10 seconds, which is [unacceptable to downstream clients of our API](https://trello.com/c/G7bmYRkT/378-email-alert-api-times-out-regularly)
- Emails were being sent to [all topics we knew about](https://trello.com/c/Zbyhoudv/379-email-alert-api-appears-to-send-email-to-all-topics-rather-than-the-selected-ones), rather than just the specific tags that were sent

This pull request, almost entirely by @elliotcm, rewrites the application as a standard Rails application, and as a bonus implements queuing using Sidekiq and fixes the topic bug.

**Note**: this will require merging a [separate PR in gds-api-adapters](https://github.com/alphagov/gds-api-adapters/issues/232) to fix the URL namespacing that's changed (from underscore separated to dash-separated), and careful deployment (we'll want to wipe the database before deploying, as the migrations and schema have changed).

I recommend checking out the code and running it to test this - reading the diff is going to be hairy.
It's just for development (see commit which added the file). I'll update
the comment.

On Tuesday, October 28, 2014, James Darling <notifications@github.com>
wrote:

> In lib/tasks/db/create.rake:
>
> > @@ -0,0 +1,9 @@
> > +namespace :db do
> > +  # We need the hstore extension, which can only be enabled by a superuser.
> > +  # We'd rather not have the app using a superuser role, so shell out and use
> > +  # the postgres user instead.
>
> Is this task just for production use? I had no probs running rake
> db:create db:migrate on my VM. If so, maybe we should say in the comment?
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/alphagov/email-alert-api/pull/34/files#r19460111>.
>


-- 
Bradley Wright

Technical Architect, GOV.UK
Government Digital Service
@bradwright