Fix potential NameError.
Delete all matching indexes in Elasticsearch for dropDatabase command.
Drop 'test' database in mongo gridfs tests so that the DocManager's client refreshes its index cache.

This is necessary because we use a separate client for test cleanup, and the DocManager's client is
unaware that the required GridFS indexes have been removed. When it tries to insert something to GridFS,
it then fails with "Can't get executor for query".
Add --tz-aware option.