Tentative fix for bug 22182
debugging: add flag for testing layer notify bugs

The GUI code *should* be capable of displaying an empty layers list now,
but it isn't. Not being able to do so reliably really hides certain bugs
when you're trying to work with someone debugging their problem via bug
report discussions.

Add a debugging flag (off by default, non-user-accessible) to lib.document
allowing the document model's New, Load, and Clear options to create empty
layer stacks. That should help in eliminating edge cases.
UI: better behaviour when no layer is selected

Bit of a grab-bag: basically make it all work correctly when the layer
stack is empty (currently that's just for debugging purposes). Helps shed
light on some weird edge cases.

* Actions which require a current layer now have managed sensitivities
* Add Layer can now add if there's nothing in the stack
* Make certain GtkTreeView state-management callbacks more robust
* Layer mode combo now has its sensitivity managed
* Layer opacity scale now has its sensitivity managed
* More careful checking when updating the UI selection
* More careful auto-scrolling when the stack presents as empty
* Clear current path when clearing the root stack
* Bugfix: announce path clearing done by set_current_path() (missed one)
* API clarity: rename command methods if they only affect current layer
* Robustness: such actions and commands now stop if current layer invalid
gui.layers: fix hidden typo in do_get_iter()

Squish a typo-bug that was hiding under a rock.

Possible fix for https://gna.org/bugs/?22182