A bunch more patches - must issue datastore_delete, make sure headers are unique, refactor format detection, support ZIP files, improve logging

* Must issue datastore_delete: Otherwise subsequent calls to update will append to the existing datastore  (e.g. use case is if the upstream file changed).
* Make sure headers are unique: Postgresql is unhappy if the headers are not unique within the first 63 characters. Calls my new function in messytables.
* Refactor format detection using my changes to messytables.
* Support ZIP files (just mime type check) since I added support in messytables.
* Improve logging.