BUG: SignedMaurerDistanceMap in 4D

This patch fixes a bug in itkSignedMaurerDistanceMapImageFilter.hxx
that resulted in a seg fault when running the algorithm in
multi-threaded mode for any dimension greater than 3D.  The bug was
the result of incorrect construction of the vector "k", which resulted
in pixel accesses outside of the image.  This bug was not seen for
images of size 3D and below because the construction of the "k" vector
was only computed for one value or less.  But for any dimension 4D and
above, the computation was done in the wrong order leading to errors
that have now been corrected.

This patch also adds 3D and 4D test volumes for the Maurer algorithm
as well as code to test these volumes.  Previously, the algorithm was
only tested for 2D (degenerate 3D volumes with only one slice).  The
new test volumes embed a 3D (4D) binary cube in a 3D (4D) volume,
which enables easy visual validation of the correctness of the
distance map algorithm.  In these tests, the center 3D volume of the
4D distance map should be the same as the distance map of the 3D
volume.

itkSignedDanielssonDistanceMapImageFilterTest1.cxx and
itkSignedMaurerDistanceMapImageFilterTest.cxx were generalized to
operate on either 2D, 3D, or 4D images by templating over image
dimension.  This avoids code duplication in the tests.  The parameters
used in the itkSignedMaurerDistanceMapImageFilterTest.cxx test were
changed to match those in
itkSignedDanielssonDistanceMapImageFilterTest1.cxx to enable direct
comparison of the outputs of the two algorithms, and the comparisons
in the CMakeLists.txt compare the output volumes of the two algorithms
to ensure that they are the same.  As a result, the Maurer test images
have been replaced although it has been verified that the difference
between the old and new images was just a sign flip because of turning
the SetInsideIsPositive off (now consistent between Danielsson and
Maurer tests).

This fix addresses JIRA ticket
https://itk.icts.uiowa.edu/jira/browse/ITK-2907

Change-Id: Ifd3411db60d100efdd72d6c06593b88fdc6d0ac3
Merge topic 'SignedMaurer4D'

354f4fd BUG: SignedMaurerDistanceMap in 4D