Fix an occasional crash in the propgrid when switching modes.

If the previous mode had a "custom" prop group, it would be removed from
the grid by the mode change, but wouldn't be deleted.  Trying to add
properties to it would then cause a crash.
Merge pull request #115 from eevee/fix-propgrid-crash

Fix an occasional crash in the propgrid when switching modes.