Novak Djokovic made it through a five-set semi-final with defending champion Stan Wawrinka, to book his place against Andy Murray in Sunday's showpiece.