Shares the first commit with #8337 Encapsulate all the consensus activation checks there by unifying script and locktime consensus flags.
It also introduces an incomplete Consensus::VerifyTx to be exposed once completed. I’m in the process of completing Consensus::VerifyTx() again in https://github.com/jtimon/bitcoin/commits/0.12.99-consensus (or you can look at an older branch in https://github.com/jtimon/bitcoin/commits/jt ).
If this is too much for a single PR, I can create another one with a subset of the commits to merge that first. If unifying the script and locktime flags still feels like a layer violation to @sipa (ie versionbits doesn’t need to know about script/interpreter.h), maybe moving all the flags to consensus/flags.h before or after this would help.
This introduces a circular dependency, but can be trivially solved merging #8329 before or after doing this. Ping @NicolasDorier @kanzure