[cpp] move to C++17
Summary:
Debian buster ships with gcc 7/8 which is all green according to:
https://gcc.gnu.org/projects/cxx-status.html
edit: backported some changes from Core PR18591 regarding implicit conversion between Span types
Test Plan:
ninja all check test_runner.py --extended
Reviewers: #bitcoin_abc, Fabien, deadalnix
Reviewed By: #bitcoin_abc, Fabien, deadalnix
Subscribers: deadalnix, Fabien
Differential Revision: https://reviews.bitcoinabc.org/D8493