Sir Keir Starmer has ruled out an early general election after a petition calling for a second vote reached two million signatures.