Fix #501 Warn user about losing new talk info

When the user switches from one talk to another, exits the talk editor,
or creates a new talk when the currently selected talk has unsaved
changes, a window comes up warning the user that there are unsaved
changes. The options are "Save Changes", "Discard Changes", and
"Continue Editing".

Fix #501
Close #605
Refactor recording api methods and fix logic

Refactored code of recording api setup, teardown, and
endpoint functions.

Changed Multimedia current_state enum from ints to strs to make some code
in recording api cleaner. Changed a test in test_multimedia.py that
broke as a result.

Fix to recording api logic determining next_id.
Fix to test_server.py teardown to undo patching to media_dict
Flattened if/then nests, removed unnecessary int casts
Fixed off by one error, code cleanup
Restructured try/except block for recording setup
All blueprint teardown code now automatically called from server module on server teardown
Implemented shelf in recording.py, modified tests.

Implemented shelf, a persistent object, to incrementally save videos as
they are added, modified, or deleted. This allows us to shut down the
server without needing any teardown, everything that needs to save on
server shutdown will already have been saved.

I had to make changes to the testing suite as a result. Since I noticed
it would be much easier to use fixtures, I decided to change the setup
and teardown of tests from xunit style to fixture style.
Restructured shelve object, now uses writeback mode
Changed 'null_flag' to 'null_multimedia'
All files in test_server.py now written to tempdirs
Monkeypatch settings.configdir to tempdir/
Monkeypatching now performed by py.test fixture
all tempfiles created by tmpfile fixtures
removed unused imports
Removed unnecessary teardown from recording fixture
changes from code review
More code review changes