st-hal: fix restarting detection after buffer overflow

When second stage is enabled and not yet detected, the buffer overflow
during first stage lab processing results in moving the state machine
to loaded state, causing no further detections. Fix it by handling state
machine events based on detection sent to client.

Change-Id: I764ac9a37b8b6a650a173e870cd3b4c08a9edf47
2 files changed