An Australian court has ruled that tennis player Novak Djokovic will be released from detention. He will be able to stay in the country and compete in the Australian Open.