Distributed Online Optimization with Long-Term Constraints