Privacy-Preserving Distributed Optimization and Learning