Keir Starmer resigns as prime minister