Try to reduce jenkins lint errors

resources/ext.smw.util.tooltip.js: line 39, col 33, 'window' is not defined.
resources/ext.smw.util.tooltip.js: line 169, col 8, 'document' is not defined.

resources/ext.smw.special.ask.js: line 188, col 39, Extra comma.
resources/ext.smw.special.ask.js: line 22, col 23, 'smw' is not defined.
resources/ext.smw.special.ask.js: line 181, col 8, 'document' is not defined.
resources/ext.smw.special.ask.js: line 218, col 28, 'document' is not defined.

resources/ext.smw.js: line 20, col 6, Missing semicolon.
resources/ext.smw.js: line 35, col 6, Missing semicolon.
resources/ext.smw.js: line 9, col 28, Weird construction. Delete 'new'.
window.semanticMediaWiki = new function () ... as auto-invoking function,
create and return a new object instance to avoid lint to complain

resources/ext.smw.util.autocomplete.js: line 40, col 21, 'options' is already defined.
resources/ext.smw.util.autocomplete.js: line 65, col 89, Bad escapement.

Lint is complaining about /([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi
Well I tried to fix the Bad escapement in regexp but I was unable to
find out what lint wants to have as \\ or \. and at which position.

Change-Id: Icf6a0167fa40a98a5f1e9fbcf315849e1dd5a492