The genome of Schmidtea mediterranea and the evolution of core cellular mechanisms