Data-Dependent Coresets for Compressing Neural Networks with Applications to Generalization Bounds