* bwdist.cc: fix regression caused with cset 4bb352ade7c7. The original code
written in C (edtfunc.c file) had variable "h" for width and "w" for height.
This was probably because the code was originally written for row-major order
and it would be easier to swap these two variables than all instances of it in
the code. This fix swaps all instances of "h" and "w" in the code. Assign
number of rows and columns to "w" and "h" respectively would accomplish the
same but may confusion again in the future. New tests were added to check
the second output argument.
* NEWS: add notice of fixing this regression for next stable release.