Language Generation and Identification From Partial Enumeration: Tight Density Bounds and Topological Characterizations