This diff is a WIP of the Emerging Consensus. (I don't know if it's ok to push WIPs or if I should work on a github repository and then push here when the code it's ready to be fully tested and reviewed)
Right now it's very simple and it's missing a lots of features, it just does not reject blocks bigger than the max block size and it follows the chain.
A test was added to check if the nodes can reorg to a chain that have "big blocks" (using EC) and if the nodes also can go back to a "normal size blocks" chain (valid using the current consensus rules). The chain to follow is always decided using accumulated work.
For now the code is called in the CheckBlock function, but it may be useful to not modified that function and "catch" the rejected blocks to revalidate them using the new consensus rules. That way the code may be simpler to follow, but if a lots of consensus rules are modified we may ended validating every block two times (one for each set of rules).
TODOs: some are descripted in the code. We also need to think how are we calling this consensus, if we are going to keep "Emerging Consensus" or change it to something else.