Photonic realization of quantum resetting