Build: Don't assume the browser environment; smoke test on Node w/ jsdom

Fixes gh-1950
So, the question remains to what we should do on Jenkins. Currently we (effectively) invoke:
```sh
npm install
grunt
grunt testswarm
```
If we have a test task, we'll need to invoke it as well. How about changing it to:
```sh
npm build # does npm install && grunt
npm test # does grunt test
grunt testswarm
```
This will make `test_fast` be invoked twice. I assume that's not a problem.