Prevent hang in ThreadPool::DrainAndShutdown()
Prevent hang in ThreadPool::DrainAndShutdown()

It was possible for WorkerThread() to call notify() between
DrainAndShutdown() checking its condition and calling wait(), causing
the notify to have no effect and DrainAndShutdown() to wait
forever. We saw this in thread-pool-test.

Change-Id: Id8917a14819b3bfe6b8c90d7a4ba5da6f8caa61e
Reviewed-on: http://gerrit.ent.cloudera.com:8080/1134
Reviewed-by: Skye Wanderman-Milne <6d4b168ab637b0a20cc9dbf96abb2537f372f946@cloudera.com>
Tested-by: jenkins

cloudera/Impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,michaelhkw/incubator-impala,cloudera/Impala,cloudera/Impala,michaelhkw/incubator-impala,cloudera/Impala