[server/sources] make sure entity._cw is a Connection before calling Storages
The storage callbacks don't get an explicit Connection objects, so they
go through entity._cw to access the repo and schedule operations. Since
that entity object comes out of the entity cache, its _cw may be a web
request instead of a Connection. So fix it up around the storage
callbacks.
Closes #5753543
[hooks] base64-encode extid before inserting it into moved_entities
If we insert the wrong value we're never going to find these entities
again... Closes #5741105.