[CMAKE] Migrate the python header generation scripts to python 3
Summary:
The shebang has already been updated, but the scripts would fail with
python3. The read() function now returns a byte array when the file is
opened in binary mode, so the ord() is no longer needed.
The CMakeLists.txt files are updated to use the correct interpreter.
Test Plan:
ninja check ninja bitcoin-bench
Reviewers: #bitcoin_abc, deadalnix
Reviewed By: #bitcoin_abc, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D4143