The influence of biological, epidemiological, and treatment factors on the establishment and spread of drug-resistant Plasmodium falciparum