CNC thread lathe