The UN's top court orders Pakistan to stay the execution of an Indian national convicted of spying, in a decision hailed by New Delhi.