BUG: Call clear instead of empty on PatchBasedDenoising EmptyCaches().

See http://www.viva64.com/en/b/0271/

PVS-Studio's diagnostic messages:

V530 The return value of function 'empty' is required to be utilized.
itkpatchbaseddenoisingimagefilter.hxx 85
V530 The return value of function 'empty' is required to be utilized.
itkpatchbaseddenoisingimagefilter.hxx 86
Due to inattention, the programmer implemented a call of the 'empty()'
function instead of 'clear()'. It leads to adding garbage to the cache, so
using it becomes dangerous. This bug is hard to find and it can lead to very
strange side effects.

Furthermore, the usage of new and delete for manual memory management of
the eigenValsCache and eigenVecsCache elements have been replaced with RAII.

No performance slowdowns were found when switching to RAII.

Co-Authored-By: Ho Cheung <hocheung20@gmail.com>
Co-Authored-By: Kris Zygmunt <krismz@sci.utah.edu>

Change-Id: Ic9bb2dc847a8ba96842594a8475580b1e1eb450a
PERF: Remove large foot print of PDF derivatives.

ITK-3286 Describes that the memory footprint is very
large for many threads and MattesMutualInformation
due to the amount of memory being allocated per thread.

Allocating memory is also the most time consuming portion
of the MI algorithm and drastically restricts the
scalability of the algorithm to many threads.

Performance Enhancments for minimizing number of
memory bufers needed to avoid false sharing by using
a queue based accumulation per thread that is periodically
syncronized with the primary pdf.  This approach
allows the time consuming part of each thread to
occur and the syncronized writing to the JointPDFDerivative
in parallel.

Each computation of a point was previously allocating new
memory.  This patch set checks if the currently allocated
memory is the proper size, and then re-initalizes that
memory if possible.

Change-Id: I72f1d1ea2be71a883a47fe71afc2724e5ec88fb8
BUG: Fix Size() in ImageToListSampleAdaptor for VectorImage's.

Also add appropriate test coverage.

Change-Id: I64eb94cd1ac51adf08008247483ef2c569735979
Merge branch 'PatchEmptyCache_release' into release

Change-Id: I0f3d838aad855e780efbac3645a0fea5d3e8f540
Merge branch 'ImproveMemoryUseOfMattesReimplement' into release

Change-Id: Ida71af825d9965dec08c202d5409e275166ae0ab