PERF: Add non-blocking mutex locking.

There are cases where it is benificial to have a
non-blocking mutex locking mechansim.  In particular,
when multiple threads need to accumulate on a single
buffer, it is nice for each thread to keep doing local accumulations
until there the global accumulation buffer is available.

This patch add non-blocking locking mechanisms to the various ITK
Mutex schemes.  The TryLock() member function was added that returns
true of the Lock was captured, and false if it had been locked by another
process.

STYLE: Remove redundant unreachable code

There is a master ifdef conditional in itkMutexLock.cxx that optionally
includes the proper NoThread|PThread|Windows definitions of the Mutex
locking member functions.  The original code had placed the
implementations in #ifdef statements of the NoThread version.  This is
wrong since that highly convoluted file was split into the easier to
maintain 3 separate files.

Change-Id: Ib3dccac4dfe62b1f47eb6e6c8c5307ded6d9e813
ENH: Use TryLock minimize thread stalls

This now uses the TryLock mechansim on each subsection so
that whichever section is capable of being processed is
done as soon as possible. A new variable is put into place
to keep track of which subsections are completed.

Isolate common variables to the top of the function.

Change-Id: I736392fc19b504623c0de51f51a1188cc9083d38
BUG: ThreadedIndexedContainerPartitioner is inclusive

The ThreadedIndexedContainerPartitioner provides ranges that are
inclusive of their end points.  This means that one must provide the
proper enpoint (i.e. size -1 ) and ensure that the number of threads
(partitions) does not exceed the number of elements in
the indexed container.

Change-Id: I1ae7ed8487abb2350fb7b2e7df2feac00e2bca59
Merge topic 'AddTryMutexPerfImprovementForMI'

82037406 BUG: ThreadedIndexedContainerPartitioner is inclusive
bede7abe ENH: Use TryLock minimize thread stalls
4fe4f1cd PERF: Add non-blocking mutex locking.