Make sure to load tags before manipulating them

Fixes a null pointer exception when deleting rules.
Do not crash when selected vertices disappear

This is a two-part fix; in the core, we deal properly with bad vertices
being given for the attach rewrites command, and in the GUI we properly
remove old vertices from the pick state so that bad vertices are never
given to the attach rewrites command.

Fixes #110
Merge branch 'stable' into integration