Switch to PhantomJS and Karma for client side tests

We are currently using jsdom for our tests, which is a crude approximation when asserting that things work correctly in the browser. Being a headless webkit implementation, PhantomJS will give us results closer to what we would expect in the browser. Additionally, Karma will give us the possibility of running our tests directly in Chrome and Firefox.