South Africa minister quits over perjury scandal