refactor: Split out responsibility of Query
Created by: dagurval
The query class has grown rather large. This is mainly moving responsibility out of the class into smaller isolated classes.
The decoupling of responsibilities will make it easier to implement (scripthash|blockchain).get_mempool as it allows for easier code reuse.
Test plan
cargo test && ./contrib/run_functional_tests.sh