A Survey on Statistical Theory of Deep Learning: Approximation, Training Dynamics, and Generative Models