BUG: Restore automatic loading of factories in ITK_AUTOLOAD_PATH

Operations performed during static initialization superseded the call
to LoadDynamicFactories, which automatically loads the itk factories
in the ITK_AUTOLOAD_PATH environment variable. This patch ensures that
the ObjectFactoryBase's methods of RegisterDefaults and
LoadDynamicFactories are always called before creation of a factory
object through the introduction of an initialization flag.

Additionally, the methods GetRegisteredFactories and
UnRegisterFactory now call Initialize to prevent the
dereference a null pointer.

Lastly the IOPluginTest was changed to not always pass. Additionally,
the loading of the ITK_AUTOLOAD_PATH now more closely models that of a
user application by implicitly loading it from the environment as
opposed to the prior Rehash. However, the TestDriver manual
registration of the BuildInFactories used a different method then the
one used during static initialization so it did not exhibit this
bug. Perhaps it should be changed to use the RegisterOneFactory
methods to match.

Change-Id: Ic01fa11d66d15faa52823c5eb79b928789678426
BUG: VTKPolyDataMeshIO for Meshes with Tensor Pixels. #2961

The NumberOfPointPixelComponents for the 3D case was not correct.

A write/read test is also added to verify functionality.

The content of this patch was contributed by Scott Robertson.

Change-Id: Ifb523cf7b1ddeff10152881b0113daa47fe46073
ENH: Functors for logic operations

A single file of logic operations: ==, !=, >=, >, <=, <,
implemented as functors, and associated tests using
the BinaryImageFunctorImageFilter. The tests cover
image on image operations, image on constant and constant
on image versions. These are intended for use in SimpleITK
interpreter bindings to allow easy image comparisons, like
thresholding.

This is a port of http://www.insight-journal.org/browse/publication/142,
as requested by Bradely Lowekamp.

Note that the original publication included &, ! and xor, which are
already available in ITK, so I haven't ported these functors.

Note: The tests currently produce a warning:

WARNING: In /home/rbeare/Monash002/Development/ITK/Modules/Core/Common/include/itkImageToImageFilter.hxx, line 104
BinaryFunctorImageFilter (0x1508f670): Unable to convert input number 0 to type N3itk5ImageIfLj3EEE

Which I think occurs during class destruction. On the surface this
appears to be related to the ability to use either constants or images
as inputs to the BinaryFunctorImageFilter.

Names have been changed to remove "2" - now we have GreaterThanEqualTo, etc.

A base class has been included that handles the foreground and background values.

Tests now check the results, by repeating the calculation using iterators.

Example has been added to the docs, as has the \ingroup option.

Extension of testing to other binary functor based filters will need to wait.

KWStyle checks completed.

Names changed to be in line with stl equivalents, as per Brad's comment.



Change-Id: Iec96cafffe89cf0d4c3b41aaf0ab54856de60609
Merge topic 'FixAutoLoadPlugin'

eaa2b17 BUG: Restore automatic loading of factories in ITK_AUTOLOAD_PATH
Merge topic 'VTKPolyDataMeshIOTensorPixels2961'

5fcbf5f BUG: VTKPolyDataMeshIO for Meshes with Tensor Pixels. #2961
Merge topic 'LogicOpsFunctors'

6388499 ENH: Functors for logic operations