Re-using the same rpc connection on multiple threads is obviously
unsafe, so this helper can be used to create one connection per thread.
This refactor does not change any behavior and can be reviewed with the
git options:
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space