Avoid assertion in ~AIStateMachine upon viewer exit.

Force the state to bs_killed before clearing the list of statemachines
in AIEngine::flush().