Iceland’s prime minister resigns, will run for president