blast: fix crash TransactionCompletedThread

When TransactionCompletedThread is destroyed, the std::thread
is signaled to exit and then joined. If the thread was never
started, the join call throws an exception. To prevent the
exception, check if the thread is joinable first.

Test: libsurfaceflinger_unittest
Change-Id: I6372bf4fff4bc04383a9018dac01b36d1c046001
diff --git a/services/surfaceflinger/TransactionCompletedThread.cpp b/services/surfaceflinger/TransactionCompletedThread.cpp
index 2c81f0a..9b9dc57 100644
--- a/services/surfaceflinger/TransactionCompletedThread.cpp
+++ b/services/surfaceflinger/TransactionCompletedThread.cpp
@@ -36,7 +36,9 @@
         mConditionVariable.notify_all();
     }
 
-    mThread.join();
+    if (mThread.joinable()) {
+        mThread.join();
+    }
 
     {
         std::lock_guard lock(mMutex);