Distributed Consensus, Optimization And Computation In Networked Systems