hal: Fix audioserver crash in device switch

Audioserver crashes at times when performing
a device switch. This is because memory
associated with offload callback thread
was being freed even though the thread
was still active. Fix this by making sure
that the thread is created only if the thread
is necessary

Change-Id: Ib9230d23004d9c8756d7688846d46e14ea219453
CRs-Fixed: 1061896
1 file changed