Search for Resonant Production of High-Mass Photon Pairs in Proton-Proton Collisions at s =8 and 13 TeV