core/tasks: make database transaction explicit
core/tasks: make database transaction explicit

This makes it more clear which parts of the process of receiving a new
test run are executed inside a transaction, and which aren't.

terceiro/squad,terceiro/squad,terceiro/squad,terceiro/squad