Evolutionary routes leading to host manipulation by parasites