refactor: Switch serialize to uint8_t
Summary:
Replace char -> uint8_t in serialization where a sign doesn't make sense (char might be signed/unsigned).
This is a backport of core#21969
Test Plan: ninja all check-all
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D15929