rpcauth: Make it possible to provide a custom password
Summary:
This adds the functionality to specify a custom password to `rpcauth.py`, as well as makes the code (IMO) easier to understand.
Backport of core PR13146
https://github.com/bitcoin/bitcoin/pull/13146/files
Depends on D3759.
Test Plan:
make check
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D3780