Moldovan parties on Saturday agreed to form a government and appoint Maia Sandu, a former education minister and World Bank adviser, as prime minister with a mandate to curb the power of oligarchs in one of Europe’s poorest countries.