Performance of photon reconstruction and identification with the CMS detector in proton-proton collisions at √s = 8 TeV