Performance of τ-lepton reconstruction and identification in CMS