Fix bug leading to race condition on serial startup related to mode state
startup() was starting a polling thread before the mode state could be set in RUN_MODE. This created a race condition: The new polling worker checks the mode state to be in RUN_MODE to run. But the mode state changed into RUN_MODE after setRunMode() was run (which is after startup()). This bug could not be experienced with one sensor, since the new thread (polling worker) was run first, exited and the setRunMode() created a new polling worker after setting the mode state to RUN_MODE.
Edited by Mike Karamousadakis