fix constness
fix some Q_OBJECT macros in class headers
fix some Q_OBJECT macros in class headers
fix crash in client shutdown, clean up some debugging, clean up Q_OBJECT