Fix the findings left after merging the design-review tasks (#12939):
- Purging a profile that authored a task no longer fails on the
foreign-key order: the chunk defers the file_task keys.
- The review activity folds every row on the server instead of the
newest 2000, and objects-gc compacts each finished sitting.
- Marking the tasks of a deleted layer lost has no layer cap: objects
above 500, or invalid ones, are not kept for restore. The client
reports a failure instead of hiding it.
- Task creation and the merge's task move take the branch file row
lock, so no task is left behind. A deleted branch refuses new tasks,
and main's clients hear about moved tasks.
- Task change messages carry the session and the changed rows. A
client ignores its own and patches its list for others.
- A carried open task whose layer did not reach main lands on the
layer's immediate parent, else on an area with the layer's bounds.
- Only a task's author may delete it, and the deletion writes a
deleted event.
- Relinking a task moves the thread created with it.
- Merges and updates from main write their revision row with its kind.
AI-assisted-by: claude-opus-5-5