Internationella domstolen har slagit fast att Myanmar begick folkmord mot den etniska gruppen rohingya år 2017.