[refactor] Make TransactionWithinChainLimit more flexible
Summary:
- Add GetTransactionAncestry to CTxMemPool for general purpose chain limit checking
- Switch to GetTransactionAncestry() in OutputEligibleForSpending
- Remove deprecated TransactionWithinChainLimit
- wallet: Strictly greater than for ancestor caps
- wallet: Switch to using ancestor/descendant limits
Instead of combining the -limitancestorcount and -limitdescendantcount into a nMaxChainLength, this commit uses each one separately in the coin eligibility filters.
- test: Add MempoolAncestryTests
This is a backport of Core PR12634
Test Plan:
make check ./test/functional/test_runner.py
Reviewers: #bitcoin_abc, Fabien
Reviewed By: #bitcoin_abc, Fabien
Subscribers: Fabien
Differential Revision: https://reviews.bitcoinabc.org/D3343