Improved AsyncTask: the progress dialog paused the UI thread, defeating
the purpose of the task being Async. Fixed by improving the
onPostExecute code. The AsyncTask now receives a third parameter as a
string, the index of the course that's being searched. If -1, then the
task was executed only to add a new course (not in the arraylist).
Otherwise, the index corresponds to a course that's going to be updated.