Set up karma and jasmine for basic unit testing

Use karma and jasmine to get up and running
with unit testing.
Refactor: HomeCtrl: Make init function

Put the code that is run on page load into
its own function, instead of in the middle
of the file.

Also some minor refactoring on the HomeCtrl
test.