Add statistics test

Additional tests for min, max, mean and stddev ops.  The tests all
follow the same pattern.

1.  Generate a random test image.  2.  Get a reference to the raw data
pointer.  3.  Calculate the statistic by directly using the raw data.
4.  Calculate the statistic by calling the op.  5.  Assert that the two
values are the same.
Add generateFloatArrayTestImg

Add a new function to make a floating point test image.  The image is
populated with random values.
Max and min bug fix

Changed MinRealType.java and MaxRealType.java test to use copies of the
'it.next()' container.

While fixing 'Min' changed the variable name from 'max' to 'min'
MeanRealType format

The auto format repositioned the opening "{" of the class to a new line.
Mean bug fix

Mean was previously calculated as size/sum.  Changed to calculate
sum/size.

The mean test previously asserted that the mean of a random buffer was
15.625.  The test was changed to assert that the mean of the buffer is
1/15.625.
Addition to mean test

An additional simple "sanity check" was added to the mean test that
works as follows:

1.  Populate all pixels of an image with a constant value of 100.0.  2.
Calculate the mean using the op.  3.  Assert that the mean is equal to
the constant value of 100.0.
Ran Autoformatter
Convolve fix and test

The ConvolveFourier op was failing with an out of bounds error. The
version of 'FFTConvolution.create' function used seems to require
extended inputs. (From the documentation of the function: "The input as
well as the kernel need to be extended or infinite already as the {@link
Interval} required to perform the Fourier convolution is significantly
bigger than the {@link Interval} provided here.")

There is an alternative version of FFTConvolution.create that takes
non-extended RAIs as input and extends the image using a mirror and the
kernel by zero.

My proposed solution is to:

    Use the alternative version of FFTConvolution.create in the default
ConvolveFourier op.  In the future add a variation of ConvolveFourier
that takes a flag indicating type of boundary extension to use (thus
allowing the caller to choose a different type of boundary such as zero,
exponential fade, etc). In this version of the op pre-extend the inputs
as desired before calling FFTConvolution.create.

I also added a test to run a convolution and check the output.
Merge pull request #33 from bnorthan/convolve_fix

Convolve fix
Merge pull request #30 from bnorthan/statistics_fixes

Statistics fixes
OpService: return requested Op with proper type

When asking for an Op of a particular type, it is nice to get back an
object typed according to that class, instead of typed as a general Op.

The only potential danger here is the Optimizer feature, which lets you
replace a Module with a different Module with identical behavior. This
change now enforces that the behavior indeed match with respect to the
object type returned by Module#getDelegateObject(). That is: that object
now needs to be type compatible with the originally requested type.
Function: implement Converter

All functions can function as converters, because they can!
Renamed OutputFactory to BufferedFactory

This clarifies that the factory can produce things other than function
outputs, depending on the circumstance.
Added OutputFunction interface

An OutputFunction is a Function, which can provide the output object on
its own given some input object.
Merge pull request #36 from imagej/output-functions

OutputFunctions
AbstractInplaceFunction: implement Converter method
AbstractOutputFunction: check for null output

Specifically, when compute(in, out) is called, the out might be null.
We want to always handle this case intelligently.
GlobalThresholdMethod: Refactor to interface

We can simplify the interface. Not every compute threshold method needs
a histogram, we should make sure that we don't have unnecessary
calculations in ops.
Add global threshold test class

This class is for testing global threshold methods.  The initial commit
has a test for Otsu threshold.  In the future tests can be added for
other global threshold methods.  The Otsu test is structured as follows:

1.  Create a ramp test image.  2.  Threshold using ops and count the
number of foreground pixels.  3.  Convert to IJ1 ImagePlus and threshold
using the ImageProcessor threshold functions 4.  Verify the count
produced by the op is the same as the count produced by ImageJ1.

imglib2-ij was added as a testing scope dependency as it contains the
utilities to convert to IJ1 ImagePlus.
HistogramCreate fixes

In 'HistogramCreate.run' a histogram class is created but the histogram
data does not seem to be generated.  It seems a call to 'countData' is
needed to generate the histogram of the input.

HistogramCreate is made an op so that the thresholding methods can find
it using the op service.