Novak Djokovic has lost his bid to stay in Australia after judges upheld the cancellation of his visa.