Amla quits as South Africa captain