Cook quits as England Test captain