DefaultScriptService: categorize private methods
DefaultScriptService: better lazy initialization

There is now properly synchronized lazy initialization for each of the
DefaultScriptService's three main data structure objects.

Furthermore, the discovered scripts are added to the ModuleService
lazily via the addLater method.
DumpStack: add TODO reminder

Most of the logic in this class will be obsolete upon the next release
of scijava-common.
DefaultLUTService: initialize lazily
ScriptLanguage: clean up style and imports
Use ImageDisplay-specific context menu

For the context menu items intended to be used with ImageDisplays,
let's use a more specific menu root string.

This change is in preparation for
org.scijava.plugin.Plugin#CONTEXT_MENU_ROOT being deprecated in the
next release of scijava-common.

Now, it may be the case that this whole idea of "context menu roots"
doesn't work well once we flesh out various context menus further.
I have my doubts. But we'll give it a try first (iterate faster!)
and see how it goes.
DefaultScriptService: tweak style
DefaultScriptService: make high priority

We want the ScriptService to register its modules with the
ModuleService *before* the MenuService gets fully initialized
and generates a menu structure.
POM: pin to scijava-common 2.9.0
SystemInformation: list all Maven-based libraries

The command reports metadata from all available Maven POMs found
in JAR files on the classpath. It also highlights any conflicting
versions, reporting which ones shadow which others.
ScriptInfo: fix bugs in param attribute parsing
Merge branch 'script-discovery'

Scripts were not being properly discovered and registered as modules.
This branch discovers all scripts in the 'scripts/' directory of the
installation and adds them to the module service as available modules.
Scripts now appear in the menus beneath the Plugins directory.

Further, to facilitate more efficient and proper discovery of scripts,
the entire ScriptService is now lazily and thread-safely initialized.

Tangentially (since there was a problem with script module menu roots
caused by a bug in scijava-common, now fixed in version 2.9.0), this
branch also cleans up context menu root vagaries throughout ImageJ.

Lastly, the branch simplifies script parameter parsing to fix some bugs.
Ultimately, we probably want to employ a true CSV parser or similar,
rather than the hacky parsing method that is currently employed.
DefaultScriptService: remove unnecessary package
DefaultScriptService: fix registration bug

We need to call super.initialize(), since the AbstractSingletonService
superclass registers a callback with the ObjectService in its
initialize() method. Without this call, the script languages never get
registered with the ObjectService.
DefaultPlatformService: fix comment
Support multiple script directories

This changes the ScriptService#getScriptsDirectory() method to
ScriptService#getScriptDirectories(). It also adds support for an
"ij.scripts.path" system property for appending additional search paths
where ImageJ should recursively scan for scripts. By default, the
folders "scripts" and "plugins/Scripts" (for backwards compatibility)
are scanned.
ScriptInfo: remove unused import
ScriptFinder: improve script discovery

We remove the "special Scripts subdirectory" logic in favor of
consistent behavior across all script candidate directories.

Scripts in the toplevel directory are now ignored, rather than being
placed into the Plugins menu directly. The main reason for this is
backwards compatibility: we want to remain compatible with Fiji's
existing "scripts" directory which currently contains .m files which
should *not* be discovered and placed into the main menu structure, but
rather exist for use with Miji.
DefaultScriptService: fix lazy init race condition

For performance, we use an unsynchronized null check against each data
structure in order to determine whether to enter the synchronized
initialization method for that data structure. Once inside, the null
check is repeated in case the data structure was initialized in the
meantime by a different thread.

The previous logic was flawed though, because after confirming that the
data structure was still null, it immediately _initialized that data
structure's object reference_ before completely initializing it. The
correct behavior is to first fully initialize the data structure in a
local variable, and only at the very end assign the correct pointer to
the data structure's object reference. Otherwise, a race condition
results when two threads call the data structure's getter method
near-simultaneously: if a first thread begins initializing, then a
second thread queries the getter and sees that the object reference is
non-null, that reference is immediately returned even though the first
thread is still not done initializing the structure itself.
DefaultToolService: tweak style