Remove hard coded localhost URLs.

Results in browsers thinking that the included scripts are an attempt at
cross site scripting attacks and blocking them. Hard coded URLs won't
work when the app is deployed to any kind of an actual server anyways.
Fix new course not showing up after creation.

On the list of courses page, if you click Create Course, fill out the
forms and then click Submit, a new course will be added but not shown in
the list until refresh.

This was caused by an exception thrown by an invocation of the
CourseController that was meant to refresh the page.

A refresh of the page shouldn't be necessary, adding the new course to
the $scope.courses variable is sufficient due to 2-way data binding.

The API was modified to return the newly created course's id and name.
This information will then be pushed onto $scope.courses.

To maintain the alphabetical listing of courses, we use angularjs' built
in orderBy filter to sort the courses by course name.
Use $location instead of window.location.

AngularJS has a $location service that is aware of the entire Angular
life cycle and is supposed to handle redirects smartly in an Angular
compatible way. It should be more helpful than calling the lower level
window.location later on.
Global courseId not needed in QuestionController.

The courseId does not need to be tracked as a global variable, it should
be passed through the url using the router. Passing the ID in the URL
instead of setting it in Javascript makes it more flexible, e.g.: people
can copy and paste the url to a Questions page directly to another tab
and it would work without having to worry about Javascript state.
Add jQuery, refactor Question/Enroll Controller.

Added jQuery for its inArray() function. It tells you the index of an
element in the array. The standard JavaScript equivalent, indexOf, is
not supported on IE8 so we have to use inArray() for backward
compatibility.

Removed QuestionController's 'fake' refreshing where it calls itself to
refresh elements on the page. Replaced with manipulating the data bound
arrays as mentioned previously. Questions are now sorted by time, with
the newest first.

Removed courseId as a global variable entirely. EnrollController was the
last one using it, now fixed by passing courseId in the URL, same
technique as in a previous commit.