alsa_sound:  Fix to avoid crash while erasing item from mDeviceList

-In AudioHardwareALSA's destructor,while erasing item from mDeviceList
is leading to crash in current implementation, if List containing
more than one item.
-This is happening because of Invalid iterator value after deleting
current item from List, then using same iterator for next operation.
-It can avoid returning an Iterator item form List's erase function
and then use it for next operation.

Change-Id: I30ba5b5a9904c1d3cad1f470f9fae84d23a90aa5
CRs-Fixed: 517101
(cherry picked from commit 41d7bad968b94bc8ac1d6ea92849b2792604963e)
diff --git a/alsa_sound/AudioHardwareALSA.cpp b/alsa_sound/AudioHardwareALSA.cpp
index 1fdc7cd..9ecd9c6 100644
--- a/alsa_sound/AudioHardwareALSA.cpp
+++ b/alsa_sound/AudioHardwareALSA.cpp
@@ -380,9 +380,9 @@
         delete mALSADevice;
     for(ALSAHandleList::iterator it = mDeviceList.begin();
-            it != mDeviceList.end(); ++it) {
+            it != mDeviceList.end();) {
         it->useCase[0] = 0;
-        mDeviceList.erase(it);
+        it = mDeviceList.erase(it);
     if (mResampler) {