refs #4996 many new tests and bugfixes, worked around some JSLint regexp issues and disabled the whitespace check which makes no sense to me. The tests do now run again in PhantomJS but report a lot of failures and I have not looked yet into it.