Updated dependencies; fixed test problems

Updating Chai from 1.7.x to 1.9.x exposed problems in the way some tests
treated array properties. Fixed.

Sinon is now installed conventionally in versioned steps, and no longer pulled
from the repo head.
Removed all references to the global `this` in Mocha tests