test_storage: introduce a db_transaction context manager
This wraps the steps needed to get a (properly wrapped) db object and run a transaction on it so we avoid repeating ourselves
Depends on !257 (closed)
Test Plan
no functional changes either
Migrated from D2067 (view on Phabricator)