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.
You can either check in that change or remove the `:name` option in the
migration.  It's a holdover from when we might've needed two indexes.

On 28 October 2014 09:20, Richard Boulton <notifications@github.com> wrote:

> In db/schema.rb:
>
> > +
> > +ActiveRecord::Schema.define(version: 20141025105641) do
> > +
> > +  # These are extensions that must be enabled in order to support this database
> > +  enable_extension "plpgsql"
> > +  enable_extension "hstore"
> > +
> > +  create_table "subscriber_lists", force: true do |t|
> > +    t.string   "title"
> > +    t.string   "gov_delivery_id"
> > +    t.hstore   "tags"
> > +    t.datetime "created_at"
> > +    t.datetime "updated_at"
> > +  end
> > +
> > +  add_index "subscriber_lists", ["tags"], name: "tags_index_for_subtree", using: :gin
>
> Running bundle exec rake db:create db:migrate changes this line
> (s/tags_index_for_subtree/index_subscriber_lists_on_tags/)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/alphagov/email-alert-api/pull/34/files#r19459324>.
>