South Africa appoint Dean Elgar as Test captain, Temba Bavuma to lead side in ODIs and T20Is