Change wallet loading code to access settings through the Chain interface instead of writing settings.json directly.
This is for running wallet and node in separate processes, since multiprocess code wouldn't easily work with different processes updating the same file.
This is a backport of core#22217