Search for high-mass Zγ resonances in proton–proton collisions at sqrt(s)=8 and 13 TeV using jet substructure techniques