James Purnell resigns from cabinet, calling on Brown to quit