Unify duplicate Breadth-First-Search traversing of the LayeredPainter and SmoothElevationPainter in a new helper function, refs #4805, making it much more comprehensible what each part does.
Document the two classes, the new function and every step of their execution, refs #4831.
Unify SmoothElevationPainter height computation duplication, remove pointless comments, use array functions and the prefix increment operator.
git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@20350 3db68df2-c116-0410-a063-a993310a9797