<!-- 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.

BOOST_CHECK_EQUAL(TestDouble(0.0), 0U);
    BOOST_CHECK_EQUAL(TestDouble(-0.0), 0x8000000000000000);
    BOOST_CHECK_EQUAL(TestDouble(std::numeric_limits<double>::infinity()), 0x7ff0000000000000U);
    BOOST_CHECK_EQUAL(TestDouble(-std::numeric_limits<double>::infinity()), 0xfff0000000000000);
    BOOST_CHECK_EQUAL(TestDouble(0.5), 0x3fe0000000000000ULL);
    BOOST_CHECK_EQUAL(TestDouble(1.0), 0x3ff0000000000000ULL);
    BOOST_CHECK_EQUAL(TestDouble(2.0), 0x4000000000000000ULL);
    BOOST_CHECK_EQUAL(TestDouble(4.0), 0x4010000000000000ULL);
    BOOST_CHECK_EQUAL(TestDouble(785.066650390625), 0x4088888880000000ULL);
    
    if (std::numeric_limits<double>::is_iec559) {
        BOOST_CHECK_EQUAL(sizeof(double), 8U);
        BOOST_CHECK_EQUAL(sizeof(uint64_t), 8U);
        
        TestDouble(std::numeric_limits<double>::min());
        TestDouble(-std::numeric_limits<double>::min());
        TestDouble(std::numeric_limits<double>::max());
        TestDouble(-std::numeric_limits<double>::max());
        TestDouble(std::numeric_limits<double>::lowest());
        TestDouble(-std::numeric_limits<double>::lowest());
        TestDouble(std::numeric_limits<double>::quiet_NaN());
        TestDouble(-std::numeric_limits<double>::quiet_NaN());
        TestDouble(std::numeric_limits<double>::signaling_NaN());
        TestDouble(-std::numeric_limits<double>::signaling_NaN());
        TestDouble(std::numeric_limits<double>::denorm_min());
        TestDouble(-std::numeric_limits<double>::denorm_min());