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.
The last commit from !182 (closed) has been used as a starting point.
This MR supersedes !182 (closed).
I did some manual testings, including the Flatpak sub-sandbox, and so far it seems to be working as expected. The automated tests are succeeding too.
/cc @smcv
Edited by Ludovico de Nittis