Add UI subsystem

It was migrated from ImageJ:
https://github.com/imagej/imagej/tree/imagej-2.0.0-beta-7.9/core/ui
Make AppService lazily initialized with singletons

This converts the AppService to a SingletonService, and also removes its
overridden initialize() implementation in favor of a lazy initialization
pattern.
AppService: add method to get foremost app

The new getApp() method returns the first app on the list -- i.e., the
one with the highest priority.
UIService: use default app instead of SciJava

This makes it easier for other applications to take precedence
without needing to override the DefaultUIService.
SciJavaApp: make low priority

This makes it easier for other apps to take precedence.

See: AppService#getApp()
AbstractInputHarvester: fix unsafe widget cast

We now explicitly check if the widget is the right type before using it.

In practice, the AbstractInputPanel#supports(InputWidget) method already
checked this, so it should never be the case that an incompatible
widget is returned by WidgetService#create(WidgetModel). But there is no
guarantee that all downstream code is using the abstract superclasses,
so let's check again -- better safe than sorry here.
CommandServiceTest: simplify CommandService call

The more complex syntax was a holdover from when there were deprecated
methods polluting the API. They are gone now, so we can use the simpler
varargs syntax.
AbstractDisplayViewer: remove irrelevant code

This logic belongs in the next layer down: AbstractImageDisplayViewer.
UIService: rename system property to scijava.ui

This is a better name now that the UI subsystem is part of SJC.
DefaultUIService: get App from AppService
UIService: Remove obsolete App API

The App can (and should) be obtained from the AppService.
Add UI event subsystem

Right now, there is just one concrete event type called UIShownEvent
that fires when UIService#showUI is called.
AbstractApp: add default getTitle() implementation

It just uses the name from the @Plugin annotation.
SciJavaApp: remove redundant getTitle() method

The abstract base class handles it properly now.
App: add getBaseDirectory() API

Now you can ask an app for its base directory, as well as the name of
the system property which overrides that directory.
Merge branch 'ui-split'

This branch migrates the UI subsystem from ImageJ core.

This system has nothing specifically to do with images, and requires no
additional dependencies.

See:
https://github.com/imagej/imagej/tree/imagej-2.0.0-beta-7.9/core/ui