Distributed Optimization for Power and Energy Systems