Issue #120: some refactoring in preparation for adding polygons.

We need to add an extra object state in addition to 'normal' and 'selected': 'editable'.
Iff a single item is selected, then it will also be editable, and extra icons or buttons
may appear to allow extra functionality.  For example, if a polygon is editable, there
will be extra controls to allow insertion of vertices.

Also added a class SlotList.