The deal worth $315 million aims to wean farmers off growing coca — the plant that’s a raw material for cocaine (as well as teas and other uses) — by replacing it with alternative crops like coffee and cacao.