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
I've got no idea what is going on here... You could help facilitiate my review by explaining how Promise.all() behaves when resolve methods throw errors, and by explaining why the first argument to then above has to be a function other than done.

Obviously I need to study up on promises, but this code seems  so clever that it is hard to follow.