Internationella domstolen har slagit fast att Myanmar begick folkmord mot rohingya-minoriteten under sitt militära ingripande i Rakhine-staten 2017.