Also improve some strings containing escaped double-quotes by using single quotes (as per PEP8 recommendation https://peps.python.org/pep-0008/#string-quotes)
This is a partial backport of core#22229
https://github.com/bitcoin/bitcoin/pull/22229/commits/6f3d5ad67ac8e7b50abae1a2949898d858e38106
https://github.com/bitcoin/bitcoin/pull/22229/commits/dca173cc044270b30782b1e3355e9dcb8c534295
https://github.com/bitcoin/bitcoin/pull/22229/commits/36d33d32b1b498b61f56d552f6e2c1d064f978c3
https://github.com/bitcoin/bitcoin/pull/22229/commits/e2f1fd8ee92fa421b6d293169044d6ddd5a9b8df