st-hal: fix pause and detection events concurrency issue

pause event in state machine is dispatched without proxy session
lock held, which causes synchronization issue when state machine
is already handling a detection event there by keeping sthal in
unexpected state leading to no further detection.

Fix it by using proxy session lock when dispatching pause event.

Change-Id: I8d93d06fdc7d8d4024a3586ebaa6c9f41d293786
diff --git a/st_session.c b/st_session.c
index 49af69f..df2e7c5 100644
--- a/st_session.c
+++ b/st_session.c
@@ -5630,9 +5630,9 @@
     st_proxy_session_t *st_ses = stc_ses->hw_proxy_ses;
     st_session_ev_t ev = { .ev_id = ST_SES_EV_PAUSE, .stc_ses = stc_ses };
 
-    pthread_mutex_lock(&stc_ses->lock);
+    pthread_mutex_lock(&st_ses->lock);
     DISPATCH_EVENT(st_ses, ev, status);
-    pthread_mutex_unlock(&stc_ses->lock);
+    pthread_mutex_unlock(&st_ses->lock);
     return status;
 }