Create a thread to handle stop requests from host

This doesn't work at the moment.
When priority of stop_func is higher (2) that priority of
rtExtModeOneStep (1), the rtExtModeOneStep doesn't run at all. When
rtExtModeOneStep is higher than stop_func, then stop_func doesn't run at
all. When their priorities are equal, only stop_func executes
(presumably waits for stopSEM and doesn't allow rtExtModeOneStep to
run). Need to investigate.