From Kenya to Ghana to Mali, governments are insisting their minerals be processed at home before they leave.