Mesoscopic supercurrent transistor controlled by nonequilibrium cooling