Convert app to using ui-router.

* Changed all $routeParams to $stateParams.
* All hrefs linking to routes defined by app changed to
  sref="stateName".
* Ideally we would take full advantage of children states but for now
  this is a good starting point.
Change datatables CDN as it kept failing
You're missing the point of promises