Annotation combiner: use ClassLoader#getResources

It is much more robust to use ClassLoader's getResources() method than
trying to iterate the class path elements extracted from the
java.class.path property, especially when running via exec-maven-plugin
(which does not have the relevant .jar files in the system class path).

While at it, look for both modern and legacy annotations, but return only
file names prefixed with the modern prefix in getAnnotationFiles().

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
CombineAnnotations: support combining legacy annotation indexes, too

Instead of reading all the JSON-formatted indexes ourselves, we can simply
ask the Index class to get all of them for us, including the legacy
annotation indexes, and then write them out using the existing
infrastructure.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
CombineAnnotations: make the output directory overrideable

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
CombineAnnotations: use the current Thread's context class loader

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Move CombineAnnotations into the appropriate package

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Update license headers

This trick was performed by:

	mvn license:update-file-header

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Add a META-INF/ combiner for uber .jar convenience

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Factor out ServiceCombiner from MetaInfCombiner

Created a new interface: Combiner - and extracted the service combining
logic from MetaInfCombiner to a new ServiceCombiner (which implements
Combiner).

The purpose of MetaInfCombiner is now purely to run both the
ServiceCombiner and CombineAnnotations classes.
Refactor CombineAnnotations to AnnotationCombiner

The org.scijava.annotations CombineAnnotations class now
implements the Combiner interface.

It was refactored to remove state, allowing its combine method to now
take any output directory (instead of requiring constructing a new
instance for each output dir).

The class was renamed to AnnotationCombiner to fit the naming scheme of
MetaInfCombiner and ServiceCombiner.

The org.scijava.util.CombineAnnotations class was updated to use the
refactored AnnotationCombiner API.
Merge pull request #18 from scijava/combine-annotations

When making one single uber .jar from a multitude of dependencies, we need not only take care of annotation indexes (including legacy ones), but also of the entries in META-INF/services/.