Bug 1070845 - [sharedtest] unit test refactoring for new version chai.assert api (rebased)

test_agent used very old version chai library version=0.5.3 in the current version=1.9.1 deepEqua
here is how I changed it:

* I throw in onResolve now (because I think this should not happen)
* I replace `.then(done, done)` by `.then(() => done(), done)` because Promise.all passes an array as argument to the success function.

works now.