[C++] Re-invent C++11-ish thread library

Android's build system uses -static to build ckati, and you
cannot use C++11's threading library with -static.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52590
diff --git a/Makefile.ckati b/Makefile.ckati
index f35824b..18ed906 100644
--- a/Makefile.ckati
+++ b/Makefile.ckati
@@ -23,6 +23,7 @@
 
 KATI_CXX_SRCS := \
 	command.cc \
+	condvar.cc \
 	dep.cc \
 	eval.cc \
 	exec.cc \
@@ -36,6 +37,7 @@
 	io.cc \
 	log.cc \
 	main.cc \
+	mutex.cc \
 	ninja.cc \
 	parser.cc \
 	regen.cc \
@@ -47,6 +49,7 @@
 	strutil.cc \
 	symtab.cc \
 	thread.cc \
+	thread_pool.cc \
 	timeutil.cc \
 	var.cc