Properly generate salt in rpcauth.py, update tests
Summary:
Previously, when iterating over bytes of the generated salt to construct a hex string, only one character would be outputted when the byte is less than 0x10. Meaning that for a 16 byte salt, the hex string might be less than 32 characters and collisions would occur.
Backport of core PR14742
https://github.com/bitcoin/bitcoin/pull/14742/files
Depends on D3780.
Test Plan:
make check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D3781