Optimal Algorithms for Non-Smooth Distributed Optimization in Networks