Novak Djokovic's latest quest for a record 25th grand slam has been brought to an end by Brazilian teenager Joao Fonseca.