FedChain: Chained Algorithms for Near-optimal Communication Cost in Federated Learning