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
> why the first argument to then above has to be a function other than done.

missed this: when all promises resolve to a value, then the promise returned by Promise.all resolves to an array of all results. That's why we need to pass a function, otherwise done gets passed an array, and mocha throws (because either "done" gets no parameter which means the test passes, or it gets an error which means the test fails with this error).

This is necessary given how Promise.all and mocha's done work.