Bug 1016432 - [Search] Fix unit tests with a newer mocha r=kgrandon

the trick is this: we wait that the "done" operation is sent by the sync operation before calling mocha's done