WIP: runtime: When copying the runtime, generate a new /etc/ld.so.cache
This avoids relying on the LD_LIBRARY_PATH as a way to get the overridden libraries into place.
Based on !185 (merged), !186 (merged).
There are some known test failures, but I'm getting there.
Edited by Simon McVittie