Qatar 'must stop support for terror', top UN court told