Add Thread::isRunning and Condition::signal(WakeUpType)

The signal() method is useful to choose whether to wake up one or
all threads.

Change-Id: I062ab6d3ddd306a9fb735549ea140e2a76eed75a
diff --git a/libs/utils/Threads.cpp b/libs/utils/Threads.cpp
index cbf4ef6..e0f12dc 100644
--- a/libs/utils/Threads.cpp
+++ b/libs/utils/Threads.cpp
@@ -846,6 +846,11 @@
     return mStatus;
 }
 
+bool Thread::isRunning() const {
+    Mutex::Autolock _l(mLock);
+    return mRunning;
+}
+
 #ifdef HAVE_ANDROID_OS
 pid_t Thread::getTid() const
 {