qa: Improve getchaintxstats functional test
Summary:
Completes T561.
Depends on D2711.
Backport of PR12083
https://github.com/bitcoin/bitcoin/pull/12083/files
Test Plan:
make check
test_runner.py
Reviewers: Fabien, deadalnix, O1 Bitcoin ABC, #bitcoin_abc, nakihito
Reviewed By: Fabien, O1 Bitcoin ABC, #bitcoin_abc
Subscribers: teamcity, schancel
Differential Revision: https://reviews.bitcoinabc.org/D2702