Teleparallel equivalent of Lovelock gravity, generalizations and cosmological applications