<!-- Needs the label "good first issue" assigned manually before or after opening -->

<!-- A good first issue is an uncontroversial issue, that has a relatively unique and obvious solution -->

<!-- Motivate the issue and explain the solution briefly -->
Right now in the functional test framework, conversions from hex-string to bytes and vice-versa are done in different ways:
- convert `bytes_obj` to hex-string: binascii.hexlify(bytes_obj), bytes_obj.hex()
- convert `hex_str` to bytes object: binascii.unhexlify(hex_str), binascii.a2b_hex(hex_str), bytes.fromhex(hex_str)

For consistency reasons, only the built-in way of using `bytes` (class) methods should be used (see also MarcoFalke's comment https://github.com/bitcoin/bitcoin/pull/22593#issuecomment-890918620):
- bytes.fromhex() (https://docs.python.org/3.7/library/stdtypes.html#bytes.fromhex)
- bytes.hex() (https://docs.python.org/3.7/library/stdtypes.html#bytes.hex)

This seems to be the most natural and modern way to do it, without a need to import any libraries, and the other ones using binascii should be replaced by those. As an example, see PR #22593 which replaced a helper `hex_str_to_bytes` (which in turn used binascii.unhexlify) with `bytes.fromhex()`. For quickly identifying instances the command `git grep binascii` can be used, though one would need to check that there is maybe uses of binascii that are still legit.

#### Useful skills:
- Python 3 basic skills, knowledge of fundamental data types string and bytes

#### Want to work on this issue?

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.

for (int j = 0; j < 1000; ++j) {
            
            
            
            for (int x = 0; x < 512; ++x) {
                uint64_t v = InsecureRandBits(64);
                v &= ~(uint64_t{1} << 0);
                if (x & 1) v |= (uint64_t{1} << 0);
                v &= ~(uint64_t{1} << 1);
                if (x & 2) v |= (uint64_t{1} << 1);
                v &= ~(uint64_t{1} << 50);
                if (x & 4) v |= (uint64_t{1} << 50);
                v &= ~(uint64_t{1} << 51);
                if (x & 8) v |= (uint64_t{1} << 51);
                v &= ~(uint64_t{1} << 52);
                if (x & 16) v |= (uint64_t{1} << 52);
                v &= ~(uint64_t{1} << 53);
                if (x & 32) v |= (uint64_t{1} << 53);
                v &= ~(uint64_t{1} << 61);
                if (x & 64) v |= (uint64_t{1} << 61);
                v &= ~(uint64_t{1} << 62);
                if (x & 128) v |= (uint64_t{1} << 62);
                v &= ~(uint64_t{1} << 63);
                if (x & 256) v |= (uint64_t{1} << 63);
                double f;
                memcpy(&f, &v, 8);
                uint64_t v2 = TestDouble(f);
                if (!std::isnan(f)) BOOST_CHECK_EQUAL(v, v2);