PERF: Remove IncreaseFrequencyOfMeasurement from inner loops

The Histogram::IncreaseFrequencyOfMeasurement uses a local
IncreaseFrequencyOfMeasurement::IndexType for the index. This is a
dynamically allocated array. When used in per-pixel loops most of the
time is spent in memory allocation. Move the index outside the loop to
remove the dynamic memory allocation in the inner-loop.

This results in an over 2X speed up for all automatic histogram
thresholding filters such as OtsuThresholdImageFilter.

After this observation, other uses of IncreaseFrequencyOfMeasurement
where replace with the extracted Index allocation. Speed up is
expected in numerous filters.

Change-Id: I7a862cc368cd935f4e05a71974c398317bb82dc5
Merge branch 'FixLabelStatisticsRequiresSameInputRegions' into release

Change-Id: I5db199446741a5943eb87df798fd376fce76ff40
Merge branch 'release'

Change-Id: Icd39912812c605eb680ac1de67130eec567d8f3d
COMP: Duplicated VectorContainer wrapping for real types.

Change-Id: Ie69ba1aa527e0ef6738383a9cf4d87be55c2bd08
Merge topic 'VectorContainer-wrapping-release'

ab0f1e44 COMP: Duplicated VectorContainer wrapping for real types.
Merge topic 'RemoveHistogramIndexAllocation'

9baf9fba PERF: Remove IncreaseFrequencyOfMeasurement from inner loops