fnReceiveIdle now timesout
Updated fnReceiveActive to become event driven with timeouts
Updated code to comply with coding standards
Merge branch 'marc' into erel

made both threads barely work together and stuff; lots of debugging to do

going to repull from dev, and merge jonathan's new helper functions

Conflicts:
	receivethread.cpp