non-local-means: swap to appropriate loop order when traversing images
non-local-means: normalize image before denoising

* This fixes the denoising, which was not correctly done in previous
  iterations of this implementation. I think I have now a quite
  decent (albeit not perfect) solution that I can use as a reference.

* Notice that I am not using the exactly same weight function as
  in the paper of Buades et al.

* Last, but not least, remember that speed was not a concern in this
  implementation. I just wanted to learn how this algorithm was done
  and also try a few things using SciPy.