Concensus tests, move bootstrap into its own file

Brought all the major consensus tests back, except compile which needs a complete rehashing.

Moved functions related to bootstrapping into their own file.