Replace hand-rolled lock code with `redis-lock` gem

This change means that there's less code to maintain, and it has a (slightly)
nicer interface.

This code is pinched from the `transition` app.
Merge pull request #10 from alphagov/use-redis-lock-gem

Replace hand-rolled lock code with `redis-lock` gem
Move service feedback perisistence to a worker

This allows doing expensive operations (eg organisation lookup
for service feedback) without delaying the form submission on
the frontend, and may result in a slightly quicker response to the frontend app.
Merge pull request #12 from alphagov/offload-service-feedback-persistence-to-queue

Move service feedback perisistence to a worker
Move `whenever` schedule into the app

The schedule isn't secret, nor does it vary across environments, so it should
live together with the app.
Merge pull request #13 from alphagov/move-schedule-to-app

Move `whenever` schedule into the app
Add mechanism to detect duplicate records

`DuplicateDetector` uses a sliding window to identify duplicates that were created within a certain period of time.
It assumes that data is being fed into the class in chronological order.
Deduplicate anonymous feedback (using a sliding window)
Add rake task for nightly deduping

Anonymous feedback coming through the user satisfaction
and report-a-problem mechanisms is sometimes submitted twice. While
there are browser-side mechanisms to prevent double submissions, they can't
be prevented entirely. This change enables running a nightly job for
deduping feedback for the previous day.
Add rake task for running frequent deduping

There is a nightly task to dedupe anonymous feedback from the previous
day. However, there are still duplicates that show up when feedback
for the current day is viewed (this is especially obvious for user
satisfaction feedback).

This change enables a deduplication task to run every 5 minutes which eliminates
the most recent duplicates.
Add deduplication integration spec
Merge pull request #11 from alphagov/move-deduplication-across-from-support

Move deduplication across from support
Fix `whenever` schedule to repair deployment

This change means that the task runs at 3, 8, 13, etc minutes past
the hour.
Merge pull request #14 from alphagov/fix-schedule-interval

Fix `whenever` schedule to repair deployment
Refactor nightly deduplication spec

This allows for test data reuse.
Bugfix: deduplication of recent feedback actually works

This change also:
- adds an integration-level spec which would have caught the bug
- removes the unit-level spec for `DeduplicationWorker`.

The unit-level spec is redundant because the logic is covered by the integration-level
spec. Furthermore, using mocking meant that the error slipped through, making the spec
somewhat pointless.
Deduplication bugfix: add all anonymous feedback types

There are several types of anonymous feedback (problem reports,
service feedback, long-form contacts) and they are all persisted in the
`anonymous_contacts` table using STI.

The deduplication process only references the `AnonymousContact` superclass,
but in order to mark a record as a duplicate, Rails needs to instanciate it
and if the class specified in the `type` column of the record isn't found
within the app, an exception is thrown.

This means that for de-duplication to actually work properly, the classes
for all types of feedback need to be present and loaded.
Move remaining ActiveRecord models to `app/models`

This makes the app look more like a normal Rails app.
Merge pull request #15 from alphagov/deduplication-fixes

Deduplication fixes