Goal of this PR is to replace integer constants with COINBASE_MATURITY but not necessarily in all cases because that would mean to read and fully understand all tests. That's out of my time constraints. Any reports where COINBASE_MATURITY should be used are welcome though!
Backport of core#21989.