The default chain for TestingSetup is the main chain. However, any test that wants to mine blocks on demand needs to switch to regtest. This is done manually and in-line right now.
Fix that by creating an explicit RegTestingSetup and use it where appropriate.
Also, add a move-only commit to move ComputeFilter into the newly created unit test library.
Both commits are part of #15845, but split up because they are useful on their own.