Bug 858141 - Don't assert on EVENT_AUDIO_ERROR while on STATE_ESTIMATING
Bug 863813 - Only call the done function once per test, failure or success
Bug 863852 - Log event and state names rather than codes
Bug 863852 - Handle reentrance in the state machine