Refactors UpdateIssue, CloseIssue, CreateTombstone, and DeleteIssues
to use the withTx helper with BEGIN IMMEDIATE instead of BeginTx.
This completes the GH#1272 fix by ensuring all write transactions
acquire write locks early, preventing deadlocks.
Changes:
- UpdateIssue: now uses withTx and markDirty helper
- CloseIssue: now uses withTx and markDirty helper
- CreateTombstone: now uses withTx and markDirty helper
- DeleteIssues: now uses withTx with dbExecutor interface
- Helper functions (resolveDeleteSet, expandWithDependents,
validateNoDependents, etc.) changed from *sql.Tx to dbExecutor
This is a P3 follow-up to the P1 sqlite lock fix (PR #1274).
Closes: bd-fgzp
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>