Ex-Labor leader McKay quits NSW parliament