Merge pull request #10899 from julienw/891927-fixes-sinon-implementation

Bug 891927 - [test-agent] the sinon sandbox is not always restored when ...
(cherry picked from commit 4939401e30ecda3ad81ba174765d48e543420453)