Move some code from jubatus/util/wscript to wscript.

Code under jubatus/util/ is from pficommon, so jubatus/util/wscript had code
which is written on top level.
Add -pthread to CXXFLAGS.

-pthread introduces -lpthread and -D_REENTRANT.
-D_REENTRANT is required for safety.
Merge pull request #16 from gwtnb/pthread

Add -pthread.