* fix: batch large deletes in teamPermanentDeleter to shorten lock time
Delete events, collections, and documents in batches of ids outside the
final transaction so row locks are held briefly instead of for the whole
team deletion, which blocked the hourly old-events cleanup for hours.
* fix: type batched destroy helper structurally
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
* fix: guard whole team deletion with a non-blocking mutex
Move the concurrency guard from the final transaction to the whole
routine so a second worker skips before running the batched deletes.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>