The evolution of complete metamorphosis in insects