refactorize the entire applyBlockToDB and undoBlockFromDB code
into its own class.

Conflicts:
	cppForSwig/BlockUtils.cpp
	cppForSwig/BlockUtils.h