Sir Keir Starmer, Britain’s prime minister, said that the country would recognise a Palestinian state in September unless Israel agreed to a ceasefire and a two-state solution.