Emit write messages

This emits messages from the write API. In `write_by_group` and `put_by_group_and_type`, celery is used to emit messages containing the dataset ID.

Currently the celery worker detects if it's running in a test environment and uses mock implementation if so. This could be improved by injecting the mock implementation in the behave tests.