bpo-44991: Make GIL handling more explicit in `sqlite3` callbacks (GH-27934)



- acquire the GIL at the very start[1]
- release the GIL at the very end

[1] The trace callback performs a sanity check before acquiring the GIL

Automerge-Triggered-By: GH:encukou
1 file changed