st-hal: Fix deadlock when load/unload merged sm while buffering

There is a deadlock because the load/unload thread can take the
st_ses lock and wait for the callback thread while the callback
thread is waiting for the st_ses lock.

Change-Id: I9828658a9f507e415c33480ea80d67811341488f
diff --git a/st_session.c b/st_session.c
index f54c999..32a6e90 100644
--- a/st_session.c
+++ b/st_session.c
@@ -3972,6 +3972,7 @@
         if (status)
             ALOGE("%s:[%d] stop_session failed %d", __func__, st_ses->sm_handle,
                   status);
+        STATE_TRANSITION(st_ses, loaded_state_fn);
     }
 
     status = hw_ses->fptrs->dereg_sm(hw_ses);
@@ -4060,6 +4061,7 @@
         if (status)
             ALOGE("%s:[%d] stop_session failed %d", __func__,
                 st_ses->sm_handle, status);
+        STATE_TRANSITION(st_ses, loaded_state_fn);
     }
 
     status = hw_ses->fptrs->dereg_sm(hw_ses);