App: setTagsForTask diffs with the local links and writes one taskTag
delete per removed link and one create per added link; addTagToTask and
removeTagFromTask write their entry and request a sync. The pull aligns
the links of every pulled task on the set the server sent, by direct
writes on task_tags in one transaction, sparing links with an unsent
taskTag entry (pure rule alignedTagIds in syncRules.ts).
Server: every link add or removal (REST routes and the taskTag case of
POST /api/sync) moves sl_tasks.updatedAt, so GET /api/sync sends the task
with its whole set of links. Task and tag creates in POST /api/sync refuse
an id taken by another account (assertIdNotTaken) instead of answering
applied without writing.
Refs #180
Refs #168
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>