geom_polygon: make sure id is a factor/numeric

polygonGrob requires that `id` is numeric, but the value passed to it,
munched$group, was sometimes a character vector. Converting to a factor
ensures that it's numeric.
Add visual tests for stat_density2d