Introduce Span type and use it instead of FLATDATA
Summary:
- Add Slice: a (pointer, size) array view that acts like a container
- Support serializing Span<unsigned char> and use that instead of FLATDATA
This is a backport of Core PR12886
Test Plan:
make check ./test/functional/test_runner.py --extended
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D4199