Fixed jshint warnings/errors

Many fall in the category missing semicolon, but there are legitimate
bugs (like throwing an error with an undefined variable, using
isInfinite instead of !isFinite or fabs instead of Math.abs).

At some places, I moved the variable declarations to avoid duplicate
definition warnings.

Redundant breaks have been removed (after return / throw).

Global variables were implicitly defined in RrdDataFile (which caught my
attention) and Base64, these have been made local.

Also fixed some whitespace errors. Yay, the consistency. Not all (style)
issues are fixed.