General code clean-up and refactoring

Mostly low-impact items in this commit, e.g. small fixes that have been
piling up amidst other work.  The few items of note include:

- Fix Adjustment menu triggers from this morning's reordering
- Better default values on some tools
- Separable bilateral smoothing has been moved into a layer-agnostic
function, so it can be used internally
- Comic book filter was modified to use bilateral smoothing instead of
Median; much better results
- Many unused variables were removed across the program

An automated scan turned up yet more unused variables; I'll keep
cleaning 'em up as part of my "prep for beta release" checklist.