Corrections to get the algorithm working

* The full square doesn't actually calculate the full square anymore.
The last row of the square is skipped because it is always calculated
in the first algorithm's main iteration.
* Fixed the column/row of the fixed axis on partial-square to subtract
the histogram.
* Fixed what is fixed/moving axis on the main iteration.
Some minor generalizations, keeping the algorithm working

* It allowed tests comparing the calculation of the histogram
by the moving window and the naive method (using always all
pixels of a neighbor).