Diversity-generating retroelements: natural variation, classification and evolution inferred from a large-scale genomic survey