Transmission stage investment of malaria parasites in response to in-host competition