port QFSpinBox from qt3 to qt4

Also did basic cleanup of #include statements
replace TRUE/FALSE defines
clean memoryFunctions.h related #include statements