swift: make SwiftClient an Angular service

This means that the Angular injector will create the SwiftClient for
us when we inject the $swift service into a controller or other
function. See the Angular documentation:

  https://docs.angularjs.org/guide/providers#service-recipe

The client will now only be instantianted once instead of being
instantiated per controller. Before it was instantiated by the
controllers, and they are in turn instantiated on every route change.
The hope is that keeping a single SwiftClient around will make it
easier to login just once.
eslint: SwiftClient is no longer a global

We now use the injector to get hold of a SwiftClient via the $swift
service. So we no longer need to pull it from the global namespace.
karma: ignore temporary files created by Emacs FlyCheck mode

These files are created a temporary files for the syntax checker and
should not trigger a retest.
test: add Swift unit test
swift: really send X-Auth-Token with requests

The second argument is a configuration object, not the headers
directly.
auth: add an authService that can track authentication

This will be used later to make a popup dialog when authentication is
needed.
login: show an authentication dialog as needed (fixes #25)

The dialog is shown as a popup window. The state of the applicaiton
doesn't matter -- we simply show the dialog when we notice that we
need authentication. So in typical usage the user will see the dialog
when first accessing the app. If the session cookie or auth token
expires, the dialog will automatically reappear.
auth: add some documentation
test: assign injected services to this

This style should make it easier to see there the state comes from.
Merge pull request #45 from mgeisler/show-login-dialog

Show login dialog