AutoSync: Learning to Synchronize for Data-Parallel Distributed Deep Learning