On the Duality between Network Flows and Network Lasso