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.
(Fwiw, I think the only problem with the original regex in the comment is that is was using \r instead of \n -- all editor text in Brackets is normalized to \n)