stereo: rewrite: Implement a rewrite of integer correlation

This adds fast box sum, best of search, and several cost functions
(Squared Sum, Absolute Difference, Normalized Cross).
stereo: rewrite: Put in support for consistency checking.

This actually just runs 2 sessions. A L2R and then a R2L. It's faster
to do 2 sessions with aligned memory access.
stereo: rewrite: Added Pyramid Correlator

Boy is it fast.
stereo: rewrite: Fine tune integer NCC so it gets better results

This also opened back up a forgotten error. For whatever reason
.. absolute error has a problem in 8bit land.
stereo: rewrite: Fix overflow in fast box sum with Gray<uint8>

It appears we were just getting lucky with ImageView<uint8> tests.
stereo: rewrite: Tune down success rate with LoG PixelGray<u8>

After fixing the overflow, this started not working. I think the
previous success rate was a fluke. If you look at the other tests
using LoG, you'll see they don't perform to well either.
stereo: rewrite: Apply prefilter after pyramid generation

This nicely helped a little bit in hard edges in the disparity. It
doesn't solve everything though.
stereo: rewrite: Introduced a new subregion code

This managed to shave 6 seconds off of my MOC run time. We went from
25s to 19s.
stereo: rewrite: Apply edge extension for all PreFilters

I think it is okay for prefilter to be doing the edge extension. It's
already happening when we apply the convolution for LoG. The other
alternative is to have the user apply edge extension themselves as an
input to the correlation view.
stereo: rewrite: Added test for cross_corr_consistency_check
stereo: rewrite: Add consistency checking to the pyramid

I think this was the last missing feature in the stereo rewrite.
stereo: rewrite: Wrote optimized parabola subpixel correlator

This is to allow use of the new prefilters and to do an additional
performance increase. The performance is through the use of
prerasterization and using the fastbox sum instead of querying all
pixels by hand.

This gives a 2x to 3x speed improvement. Your mileage will vary based
on thread interactions as it seems now the system can't serve the image
fast enough.
stereo: rewrite: Move some tools in Correlation.h to Correlate.cc

There is no need to be recompiling these in every project.
stereo: rewrite: Moved fast_box_sum to valarray

It's a small improvement, it's just one above of a C style array.

Valarray has some cool features like sum, apply, max, and min which
are supposed to be SSE optimized. Bjarne Stroustrup wrote about it for
vector arithmetic in "The C++ Programming Language 3rd Ed" page
662. The internet seem doubtful that the compiler side support was
implemented. Never the less, it's still pretty cool.
stereo: rewrite: Style enforce in inner loops

-> Use preincrement when ever possible
-> Use data() instead of crazy math
-> Avoid additional variables whenever possible
-> Use const whenever possible
stereo: rewrite: Remove the use of enums in PreFilters

Following Kyle's suggestion this makes the code much easier to
read. It also protects the user from passing an object that is not one
of our supported prefilters.
stereo: rewrite: Added mask pyramid correlator variant
stereo: rewrite: Stop bad malloc on correlation of too small a tile

The math for figuring out how many levels to processes was coming up
with a negative when the tile be rendered is too small (think around
or smaller than kernel size). That number casted to a size_t causes a
request for a really large array and a bad alloc.

There was also a problem where it was attempting to render a zone that
was outside the disparity image.

The pyramid data was too cropped to support cross consistency
check. Now it should refer back to the original image plus edge
extension.
stereo: rewrite: Fix pyramid correlation's cross correlation

It wasn't using the prefilter on the cross correlation step, thus,
there was a lot of dropped pixels. So know the cross correlation code
is just using the pre-rendered images.

This commit also applies the disparity filter, which is a fine
perfomance improvement for cross correlation.
stereo: rewrite: Added edge extension to cross correlation

There are no guarentees that we won't try to access out of
bounds. It's all a question of what the search range happens to be. We
could over crop for the worst case but that would be using a lot of
memory to handle a rare event.