Plasmodium falciparum adapts its investment into replication versus transmission according to the host environment