Don't start a sub-transaction in set_state()
Don't start a transaction in set_metadata()
Don't use a transaction in make_base_track_db()
Don't start a transaction in OntologyLoad::load()
Add DB->cached_connect() and call where possible

This prevents locked database errors from SQLite in some cases because all
accesses go through one connection.