add test renderer and valid thread framework

need to solve memory leak, maybe try to process QUIT message