Instead of checking every element of a
heightmap for eligibility to process,
only the elements neighbouring just
processed elements are checked.
This cuts the time to roughly a third.
This function accepts an array representing the height map of an area
and accumulates pixel count through steepest path downward.
This is a naive implementation that takes quite some time to complete
for larger maps.