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

-> https://bugzilla.mozilla.org/show_bug.cgi?id=973112