Implement support for ES3 browsers (tests passing in IE6-8!)

* Add es5-shim.js to test suite to allow running tests in ES3 browsers.

  To avoid duplication, inefficiencies and to allow the user to make
  their own choice, oojs does not ship an ES5 shim.

  Source code from https://github.com/es-shims/es5-shim/blob/v3.4.0/es5-shim.js

* Add json2.js to the test suite.
  While IE8 was early with JSON support; IE6, IE7 and other ES3-based browsers
  do not have it. Therefore ship json2.js as well.

  Source code from https://github.com/douglascrockford/JSON-js/blob/3d7767b/json2.js

* Document the environment we need and recommend a polyfill. This
  is also the polyfill we'll ship in the test suite (e.g. for
  testing IE 8 suport).

Unit tests failures in IE8 (now all passing):

* Test "core: inheritClass" fails in IE8.
  > 1.  Died on test #1 "Object doesn't support this property or method"

  Missing Object.create. After loading es5-shim and es5-sham it still fails:

  > 15. constructor property is restored
  >     Expected:  function Bar( ){ [code] }
  >     Result:  function Foo( ){ [code] }
  > 16. super property points to parent class
  >     Expected:  function Foo( ){ [code] }
  >     Result:  undefined
  > 23. super property points to parent class
  >     Expected:  function Foo( ){ [code] }
  >     Result:  undefined

  This is due to IE JScript's DontEnum bug. Filed bug upstream
  <https://github.com/es-shims/es5-shim/issues/252> and using a different
  polyfill instead of es5-sham.

* Test "core: compare( Object, Object )" fails in IE8.
  > 8. Empty array equals empty plain object
  >    Expected: true
  >    Actual: false

  This is due to es5-shim adding methods to Array.prototype, and,
  because there is no way in ES3 to add unenumerable properties,
  these are exposed in the for-in loop in OO#compare.

  Fix by filtering out non-own properties in OO#compare.

* test "core: getObjectValues"
  > 5. Throw exception for non-object (string)
  >    Expected: function TypeError() { [native code] }
  >    Actual: { "message": .., "name": "TypeError" }

  Due to non-standard inheritance between Error and TypeError in IE8,
  triggers bug in QUnit https://github.com/jquery/qunit/issues/595.

  Fix the test suite by matching against the stringified version of the
  error instead of the error itself.

* Test "util: isPlainObject - browser specific" fails in IE8.
  > 1. instance of HTMLElement
  >    Expected:  false
  >    Result:  true
  > 2. instance of Document
  >    Expected:  false
  >    Result:  true
  > 3. instance of Window
  >    Expected:  false
  >    Result:  true

  Fix by explicitly filtering out DOM nodes and Window objects
  in OO.isPlainObject. Similar to how jQuery does this already.
  We previously removed these extra conditions as optimisation
  for modern browsers but adding back in now.

* Test "util: isPlainObject - browser specific" fails in IE8.
  > 6. Died on test #6 undefined on non-object.

  This is a small bug in the test suite, not in the source code.
  It's important to specify the 'src' property on an iframe node.
  Otherwise, in old IE, the iframe's global object remains
  unpopulated and has no objects like 'Object', 'Array' and 'Error'.

* Test "EventEmitter: once: Callback ran only once" fails in IE8.
  > 1. Callback ran only once
  >    (passes)
  > 2. Callback ran only once
  >    Expected:  1
  >    Result:  2
  > 3. Callback ran only once
  >    Expected:  1
  >    Result:  3
  > 4. Expected 1 assertions, but 3 were run

  This is due to the use of self-referencing of function names
  inside EventEmitter#off which isn't supported in IE8.

  Fix by using a local variable instead.

Bug: 56341
Bug: 66804
Change-Id: I9e749aabba17ec269325f02ceb0dc01c91c11969