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
Update NEWS
Fix position_dodge example. Fixes #755
Merge pull request #771 from wch/fix-polygon

Fix polygon grouping bug
Draw only one set of logticks, and don't use aesthetics from data. Fixes #767
Update NEWS
Merge pull request #772 from wch/fix-logticks

Fix logticks color (#767)
Draw appropriate symbol in crossbar legend. Fixes #768
Update NEWS
Merge pull request #769 from wch/crossbar-fixes

Fix crossbar legend symbol
Revert stat_summary grouping. Fixes #739 and #732
Add visual tests for stat_summary
Update NEWS