Communication-Efficient Optimization and Learning for Distributed Multi-agent Systems