The PM had faced growing calls from Tory MPs to stand down, and quits after just 45 days in the job.