Add docstrings to sql.py
Use original time for logging hack
Fixes for delete.
fix context check in db/utils.py

The context check was causing an unnecessary fallback to sqlalchemy/api
by trying to access IMPL.is_admin
use model internally for instance update
add missing __init__.py for mysqldb tests.
Add InstanceInfoCache Mixin and API calls.