Single photon production at hadron colliders at NNLO QCD with realistic photon isolation