RFC: non-maximal suppression edge thinning functions

Nonmaximal suppression is a useful edge thinning technique often used in edge detection.

This is a translation of a matlab function from http://www.csse.uwa.edu.au/~pk/research/matlabfns/Spatial/nonmaxsup.m 

(He also has a number of other nice matlab functions available under a permissive license).

~~This function works for column-major images (and arrays), but needs some work to work for row-major arrays.~~

~~It also needs to be split into two functions, as one part of the functionality is to do subpixel localization of the peak, which might not always be wanted/needed.~~

~~(I believe it useful, e.g., for the hough transform, although I haven't verified this yet.)~~

~~I would love some tips on how to approach converting this to handle different image orientations.~~