#501 - Prompt user to save/discard/cancel unsaved changes when switching from one talk to another in Talk Editor

This is not done yet. However, I have been advised to make a pull request as soon as possible.

Ultimately, I would like to have it set up so that, when the user has unsaved changes in a talk and clicks on a different talk from the tableview, a window comes up asking them if they want to save their changes, with the options "Save" (save changes and select the new talk), "Discard" (don't save changes, just select the new talk) and "Cancel" (don't save changes but don't select the new talk either).

I have not made any huge changes yet -- a lot of my time has been spent just understanding Qt and how all the methods interact with each other. I expect to make more progress this week. However, to start with, I have added a method called "click_talk" which mediates between tableView and talk_selected. I know it doesn't look very useful right now, but I believe that it will make things easier in the long run to have a method that acts only when the user clicks on the talk -- as it is, talk_selected is called both when the user clicks on a talk, and in the select_talk method.

ToDo:

- [x] Add QMessageBox with save/discard/cancel options
- [x] Add functionality to this QMessageBox (Will attach screenshot soon)
- [x] Ensure that NEW talk is selected after user selects "Save"
- [x] Change options in QMessageBox to "Yes", "No" and "Cancel"
- [x] Enable user to save changes to current talk before creating new talk (Perhaps this should be made a separate issue -- thoughts?

Screenshot of QMessageBox:

![screenshot from 2014-10-03 13 28 19](https://cloud.githubusercontent.com/assets/6202431/4512075/38ad7384-4b3c-11e4-9040-fb953294fd97.png)

Closes Issue #501 when done.
To paraphrase my comment, currentTalkIndex stores the index of talk that the user most recently selected.

Suppose the user has already selected Talk A, so Talk A's details show up in the TalkDetailsWidget in the bottom half of the Talk Editor. The user then clicks on Talk B in the tableview.

Without currentTalkIndex, the moment the user clicks on Talk B, the talk editor loses any memory of the index of Talk A (as far as I can tell). Suppose the Save/Discard/Cancel window comes up, and the user selects Save: where should the details be saved to? If the user selects Cancel (which, as I suggested in another comment, is meant to allow the user to backtrack and continue editing Talk A if they wish) then which talk is supposed to be selected? It seemed to me that the best way to do this was to store the index of Talk A.

The reason it is a QPersistentModelIndex is because QPersistenModelIndex, as I understand it, was designed to be stored and used later, and QModelIndex was designed for immediate use. I am basing this on the Qt documentation, as seen on this page: http://qt-project.org/doc/qt-4.8/qpersistentmodelindex.html

"Unlike the QModelIndex class, it is safe to store a QPersistentModelIndex since the model will ensure that references to items will continue to be valid as long as they can be accessed by the model."

Would it be less confusing if it were called "previousTalkIndex" -- perhaps that would make it more obvious what it's for? I would also be open to changing the comment to clarify what's happening.