fix CI, add e2e tests to grunt karma task

Also use "grunt test" rather than calling karma directly so more of the build
is actually tested, and switch karma to use phantomjs for headless browser
testing (comes with Travis CI, but karma's default browser, Chrome, does not).