World number one Novak Djokovic has surpassed Swiss star Roger Federer as the highest-earning player in ATP Tour history.