Fix implicit integer sign changes in strencodings and reduce size of strencodings decode tables
Summary:
This is a backport of core#23756
Depends on D12812
Test Plan:
With UBSAN
ninja && ninja check check-functional
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D12813