extra priority in case playing PVR stream
close socket on exit (avoid kernel keeping track for next 30s)
catch sigterm so proper exit with cleanup during Quit will happen
if XBMC exiting, take care that in case XBMC can't kill python threads (from any add ons running), we will kill it. so RPI will not be blocked for long minutes - specially ugly on shutdown reboot
PVR priority level
special mode for opening socket not blocking it on close for next 60s. on restarting XBMC standard way opened socket caused Event Server not started (port not free)
bigger buffer. with 256, playlist event didn't fit causing crash (exception on json unpack)
with the fixes no ore need to sleeps during restarts etc. verup