Fix output inconsistencies

Running setFlow2 in reverse order produces different results for a
handful number of pixels. Instead, we create a new vector with the
remaining flats and use that in the next iteration.
Set default CMake build type to Release
Print inconsistencies on the same line
Fix compiler warnings
Speed up compilation for recent CMake versions
Fix mismatched deallocations
Minor fixes and cleanup