Tag sets (aka "layers")

This is work on the "layer" idea.
It's my first submission here, so if I've got things wrong, let me know and I'll correct them, I hope.

After discussion with Nicolas I've renamed "Layers" to "TagSets", and adjusted all the file, class, and method names.

I think this is an extremely important idea that will assist with annotations and other associated ideas.
I think it needs more refining before a proper implementation can be confirmed.

The main features implemented are :

1) Allowing multiple tags per element
2) Implement "auto-tagging", where newly entered (relevant) elements automatically receive tag(s).