Paolo Gentiloni, Italy’ s foreign minister, was set to replace Matteo Renzi as prime minister.