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.
Maybe the trick here is to use *minimum* match length (the default is *maximum*) by changing `+` to `+?` like `/^\s+?$/gm`