Consensus Changes
This was originally meant to add testing, but there's not much testing in this PR. I figured the number of changes that I have made are already significant enough to justify a PR.
The api package now uses the consensus set as a module instead of importing the state directly.
RelayBlock is not called when loading blocks from disk or during synchronization.
The synchronization loop is a lot smoother, and is no longer random. Instead, it iterates through all peers and calls 'synchronize' on each of them, taking 20s breaks in between each peer. If a synchronize call fails, the 20s break is skipped.
Then another 20s break occurs before refreshing the peer list and starting over.
I also added a function to test a batch of transactions. I'm not sure if this function works as intended, ti doesn't have testing.