Persistent Homology for Learning Densities with Bounded Support