Search for a W' boson decaying to a tau lepton and a neutrino in proton-proton collisions at sqrt(s) = 13 TeV