Move DB imports out of module-level

DAOFactory gets imported by different CRAB bits, but that's bad if
the three dialects aren't loaded in SQLAlchemy. Push this inside the
module