Botswana’s president has moved against a rival in his party, exposing an internal split with only months to go before elections.