test: simplify uint256 (de)serialization routines
Summary:
These routines look fancy, but do nothing more than converting between
byte objects of length 32 to/from integers in little endian byte order
and can be replaced by simple one-liners, using the int.{from,to}_bytes
methods (available since Python 3.2).
Backport of core#27516
Test Plan:
ninja check-functional
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, PiRK
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, PiRK
Differential Revision: https://reviews.bitcoinabc.org/D16874