Warn when using db_transaction/db_transaction_generator where you shouldn't.
Summary:
I did it, it caused closed cursors that hang the process,
that's hard to debug.
Reviewers: Reviewers, ardumont
Reviewed By: Reviewers, ardumont
Subscribers: ardumont
Differential Revision: https://forge.softwareheritage.org/D556