Starvation reveals the cause of infection-induced castration and gigantism