Fix a potential assert in SpeechRecognizer dtor. When StopRecognition is invoked and no data was recorded, there is a possibility that the delegate might release the recognizer within the DidCompleteRecognition callback. So we now perform cleanup tasks such as freeing the encoder_ object before invoking the delegate. Without this change there would be an assert in the SpeechRecognizer dtor about encoder_ remaining valid.
Fix a potential assert in SpeechRecognizer dtor.
When StopRecognition is invoked and no data was recorded, there is a possibility that the delegate
might release the recognizer within the DidCompleteRecognition callback. So we now perform cleanup
tasks such as freeing the encoder_ object before invoking the delegate. Without this change there
would be an assert in the SpeechRecognizer dtor about encoder_ remaining valid.

BUG=none
TEST=Manual, double-click on the speech button quickly a few times and verify no assert pops up in the dtor.

Review URL: http://codereview.chromium.org/6381004

git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@71994 4ff67af0-8c30-449e-8e8b-ad334ec8d88c

wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser