Use ZMQ to notify new events. Fix #53

With Escalator, in order to detect new events, we were making
a request every 0.1s in the Referee and the Dealer.

Now, events are still stored in the DB, but when a new event is
storred, a notification is sent to the Dealer or the Referee, so
we don't need to do periodic requests anymore.
Add at_exit helper in utils.
Add Escalator.close. Close if context terminated.

Escalator.close can be used to close the client in
a blocking (lock) or non-blocking way. If it fails
to close due to locking, another thread will
raise EscalatorClosed as soon as the context is
terminated.

The context can now be given in parameter to the
client.
Referee: Use one publisher per event.
Close the Referee properly.
Plug: Lock the publisher
Close the drivers properly
Amazon S3 Driver : Proof of Concept
* Rollback to the real Proof of Concept original version instead of the broken multipart one
* Modification to pass flake8 build
* New version of S3 driver : added manifest.json

* Making the changes to match the new way to handle the Plug

* Added some exception catches and documentation
* Refactoring of the start function

* Added the get_conn function
* Moved some error handling code.
  It didn't try to catch exceptions at the right place.

* The get_bucket function now takes a boolean arg, allowing
  to ask it to only check the bucket's existence without trying
  to fetch contents (it is faster).

* New get_file function that raises ServiceError if file is not found
  on S3. Better than to try and raise in the several functions that do it

* Now handling some S3 read timeout errors by raising TryAgain exceptions.

* Encountered a socket.error exception raised by boto in the check changes thread
  when connection reset by peer.  Handling it by trying a reconnection

* Moving from concatenated strings with '+' to str.format()
* Fix flake8
Return of the multipart upload approach.

* Get rid of the global variables as it wasn't thread-safe

* Add helper functions get_file_timestamp and get_file

* Add the set_chunk_size handler, as S3 requires parts of at least 5 MB

* Add some documentation, or modify existing one

* The bucket polling thread now checks for and skips the files that are
  currently being uploaded. This used to cause transfer problems.
Add the tests of s3 driver.

Not perfect since there seems to cause an import problem with tox.
But the tests can be run directly with py.test.
Still investigating on that issue, with no real idea of what's wrong.
Adapt the S3 Driver to Escalator.

* S3 Driver now takes the Onitu root into account.
  The CheckChanges thread now only lists keys that are prefixed with this root.
  The driver now checks that the given root isn't a regular file on the remote
  S3 bucket. S3 doesn't have a concept such as a directory, so it just checks
  that root is a 0-size file.
  Root now defaults to '' in the manifest.

* All filenames passed to the driver are now prefixed wit the onitu root

* No longer uses the TryAgain exception

* Catch in the end_upload handler against empty uploads (e.g. for tests).
  Amazon S3 raises an exception when a MP upload is empty.

* Adapting the tests to make them work. Taking the root into account seems to
  bug the tests. But they run fine with an empty root. So leave it as it is for
  now.
Change an old statement which isn't valid anymore.
  At some point the timestamp was initialized with '0.0'. But it is now
  a float.

* Change the quotes convention

* No more '\' in strings

* A timeout now raises ServiceError in all cases

* Removed unnecessary str(...) when using string.format()

* Add a condition to import StringIO from io in Python 3.