CMake build system and a slew o bug/warning fixes.

* A few include paths were using non-portable '\' separators
* Fix up some of the Qt include paths
* removed redundant newTB method
* Split GraphicsViewEditor.cpp into a proper header/cpp pair
* Fix include guard in GridEditor.h
* Removed all _sleep calls in destructors
* Moved (png/qss) resources into the executable
* fix many warnings
* remove a few unused functions ( binarysearch )
* a few small refactorings.