Verify mPollThread is joinable before detaching

If HidlSetUp() bails before startPollingThread() is called (which can
happen if the HAL isn't implemented on the given device), mPollThread
will initialize with the default constructor resulting in joinable()
returning false which means calling detach() throws an exception.

Checking joinable() before detaching allows the test suite to be skipped
successfully.

Fixes: 136736906
Test: Run vts-tradefed on VtsHalSensorsV1_0Target and verify that it is
    skipped successfully on a device that doesn't support HAL 1.0

Change-Id: Ie685ae2dc314edb8df2f3cc7112141a2f5e46008
1 file changed