added contrilthread.cpp, and fixed up controlthread.h