[improved #1816] Support for BIP 23 block proposal

Based on top of #1816, but makes the context-dependent block checks not use mapBlockIndex.