Implemented some more block logging

Moved some things around and added a addChangeSet to History.
Also made History generic.

Additionally there is a mechanism that will prevent new ChangeSets from being added
to the active queue while that queue is being dumped to database.

Those ChangeSets are added to a new empty queue when the History becomes writable again