Moving various things out of db/backends/appengine/base.py into utils.py or caching.py.  Otherwise we have a huge number of circular imports caused by base.py using things from commands.py which uses lots of things from base.py.