Australia agrees not to deport tennis star until end of his legal appeal to stay in the country and play in the Open, government says he poses a threat to public safety