Search for narrow resonances in dilepton mass spectra in proton-proton collisions at sqrt(s) = 13 TeV and combination with 8 TeV data