Online Distributed Optimization with Efficient Communication via Temporal Similarity