Wave of refactoring in ViPaint.

Whitespace changes. Better comments and Javadoc comments. Correct many
mispellings. Renamed a variable and function.