Remove invalid assertion
Enforce that arity test is not done in browsers
add json shim
Add missing onDone calls which cause failures during browser testing

Also includes

- Refactoring onDone to clearUnhandledHandler
- Replacing \r\n with \n
Use a timeout for better test isolation in IE7