General fixes for MySQL backend
General Mongo fixes
Fixes for the zoned/local time issue.

Pinging @meteficha @gregwebs. I'm not certain that I've done the right
thing for MySQL and MongoDB here, can you review?