Remove stale groups on data removal.

Previously, groups would never be removed even if the values that
created them were removed.

Fixes #91.