USA, Ryssland och Ukraina enas om att stoppa attacker i Svarta havet och mot energianläggningar efter samtal i Saudiarabien.