add thread and mutex utilities, based on googletest