On the Provable Generalization of Recurrent Neural Networks