Archive policy overhaul
This gets the archive to/from moving working smoothly, including Archive Policy:
. It adds a decent test suite for it too.
This is work towards fixing the situation in #323 (closed). There are some very small, unrelated fixes included.
Edited by username-removed-24982