caos: Track link changes at the session level
caos: Track link changes at the session level

Changes to links are now tracked at the session level like changes to
entities.  This makes correct reordering and dependency resolution much
simpler since the session sees things as a whole.

Another important change is that it is no longer possible to sync() an
individual entity.  Allowing to do so makes it hard to keep the session
consistent.  It is only possible to sync() the whole session now.

edgedb/edgedb,edgedb/edgedb,edgedb/edgedb