hal: Fix VTS errors

Deinit speaker protection thread(Cirrus)
before deinit of platform to avoid usage of
platform NULL pointer for further underlying
function calls.

Add a check to handle NULL pointer if VTS testcases
does not open a usecase.

Change-Id: I300a9b47e80e0d8349a15ed17533e62b2e7bf214
9 files changed