Submit and fetch entries

www.agileplannerapp.com/boards/173808/cards/7897

the publishing applications use a content_id to
submit and Entry for a piece of content. for now
we need to retrive all entries for a particular
format.
Merge pull request #4 from alphagov/entry-crud

Entry resource CRUD
Switch to factory_girl_rails to pull in the railtie

Without this, we need to explicitly load the factories etc.
Wrap factory_girl linter in a transaction.

Since https://github.com/thoughtbot/factory_girl/pull/707 the linter now
calls create on each factory, and this was polluting the database.
Wrapping this in a transaction that's rolled back prevents this.
Add helper to support asynchronous assertions.

This runs the passed block repeatedly until it no longer raises an
exception (expectation failures are implemented as Exceptions).  If the
block is still raising the exception after the timeout that exception is
raised meaning that the expectation failure bubbles up as normal.
Integration spec for message queue consumption

skipped for now as there's no implementation yet.
Add hooks to start and stop consumer in tests.

Include placeholder rake task that does nothing but sleep for now.
Test helpers to publish messages to the exchange.
Add a generic rabbitmq consumer class.
Add imessage queue processor class

This handles making updates to the register based on messages received
from the queue.
Hook rabbitmq_consumer up to the processor
Set up database cleaner.

This is to allow us to use non-transactional cleaning for the message
queue integrations tests.  The message queue consumer runs in a separate
process, and is therefore outside the tests' transaction, so this is
necessary.
Make the message consumer helper wait for startup.

By waiting for a message to be written to stdout, this blocks the test
process until Rails has booted in the consumer process.  This in turn
means that the tests don't sometimes timeout because it takes too long
for the first message to be processed.
Enable the message queue integration tests.