Often when we're updating mempool entries we update entries that we
ultimately end up removing the updated entries shortly thereafter. This
patch makes it so that we filter for such entries a bit earlier in
processing, which yields a mild improvement for these cases, and is
negligible overhead otherwise.
Increase limitancestorcount in tournament RPC test to showcase improved algorithm
This is a backport of core#21464
Notes:
- I did not see a significant gain for this functional test. If there is any improvement, it is less than the usual variability (+- 10 seconds for a test that takes 220 seconds).
- the policy/mempool.h include is needed for DEFAULT_ANCESTOR_LIMIT and DEFAULT_ANCESTOR_SIZE_LIMIT