use base58 map instead of strchr()
Summary:
Backport of Bitcoin Core PR12704
https://github.com/bitcoin/bitcoin/pull/12704
Test Plan:
make check
Reviewers: Fabien, O1 Bitcoin ABC, #bitcoin_abc, deadalnix
Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc
Differential Revision: https://reviews.bitcoinabc.org/D3938