Multiple small RNA pathways regulate the silencing of repeated and foreign genes in C. elegans