jslint: remove whitespaces using simple regex

Small speed improvement to the default lintjs extension. Replacing obsolete for loop with a simple regex to remove whitespaces, if a line contains only whitespace.
@redmunds But this one does use the `m` flag, by design since it relies on `^` and `$` to mark line boundaries.

@MarcelGerber's Cool, that seems like a viable option too.  So @MartinMa I think either `/^[ \t]+$/gm` or `/^[^\S\n]+$/gm` is fine -- personally I don't have a strong opinion between the two.