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 [[https://github.com/bitcoin/bitcoin/pull/21464 | core#21464]]
Note: 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).