Photoreduction of nitrogen trifluoride with controlled release of radicals