[fix bug 896961] Add base JS unit tests for bedrock global.js

So I started writing some base JS unit tests for some of the stuff in global.js,

This is by no means complete or exhaustive, but it's a starting point at least...

Currently the tests are written using Jasmine using it's own in-browser spec runner. Pretty basic, but we could switch to using a node-based runner (or something else entirely). For some of my own stuff I've been experimenting with Karma for a test runner, using Travic CI.

Anyway, have a poke around - open to suggestions.