On How Well Generative Adversarial Networks Learn Densities: Nonparametric and Parametric Results