Fixed large issue with the ui that would lead to memory leaks!

The issue would make the mock modes (with rainbow colors) work, but
would make live images leak memory and get bad performance after a while
(depending on xmx settings) due to garbage collection.

The ui has been redone to fix this issue, but the ui is now not as nice
as before (but it works). This will be fixed in a later commit.

Also added some safeguards to the SocketDummy project as it would not
run on osx!

Also some small changes to the XBMC plugin!