[bug973112] - Moved error tracker to a separate file, change 'onerror' to 'eventListener'

[bug973112] - Modified eventListener

[bug973112] - Added 'window.jsErrorDetected = true;' back
Merge pull request #608 from admix/bug973112

[bug973112] - Moved error tracker to a separate file, change 'onerror' to 'eventListener'