POM: update to pom-imagej 2.40

This updates the versions of several components to include the new
anonymous usage statistics subsystem.
POM: add imagej-usage to dependencies

This adds support for tracking anonymous usage statistics.

See: https://github.com/imagej/imagej-usage
ImageJ: add UsageUploadService to the gateway
POM: add scripting-groovy to the ImageJ bundle

Groovy itself clocks in at over 4MB, not counting its dependencies.
But Groovy is one of the most popular JVM scripting languages, so it
seems like an omission for ImageJ not to support it out of the box.
ToplevelImageJApp: use version from LegacyService

The LegacyService now has a getCombinedVersion() method, which is
exactly what we need for the toplevel ImageJ application.

However, there is currently an issue where the LegacyService is not
injected properly into the ToplevelImageJApp. This is because during
LegacyService's initialize method, it calls IJ.showStatus which triggers
a chain of events culminating in initialization of the default app.
Once we resolve that problem, though, then this change will matter.
Merge branch 'usage-statistics'

This branch enables the anonymous usage statistics subsystem.
It will be very useful to help developers understand which aspects of
ImageJ are most commonly used, and hence prioritize future work.