Allow CheckSequenceLocks to use heights and coins from any CoinsView and
CBlockIndex provided. This means that CheckSequenceLocks() doesn't need
to hold the mempool lock or cs_main. The caller is responsible for
ensuring the CoinsView and CBlockIndex are consistent before passing
them in. The typical usage is still to create a CCoinsViewMemPool from
the mempool and grab the CBlockIndex from the chainstate tip.
This is a backport of core#20833 [1/1333]
https://github.com/bitcoin/bitcoin/pull/20833/commits/42cf8b25df07c45562b7210e0e15c3fd5edb2c11