International Court of Justice says it cannot rule on dispute over alleged atrocities in Abkhazia and South Ossetia.