Use sinon in test suite

Avoid timeouts in test suite with sinon. Cleaner asserts with spies.

Sinon.JS is from git because of https://github.com/cjohansen/Sinon.JS/issues/301
Specify commit id for phantoms to prevent breaking