Fix #628 Unload Input Source Problem

Now the user can load and unload video/audio input sources
and record without closing the program.

This bug was caused because the flag variables
self.record_audio and self.record_video are not cleared
after a cycle of recording ends. So the program will
try to unload the source even it has been unchecked.
This fix reset the variables by the end of recording
so it will not influence the next one.
Added database.py tests and refactoring

-Removed test methods that only check function return types
-Created resources folder for common test data like test rss feeds
-Fixed database.py query bugs
-Added database folder for database related tests
-Refactored common database fixtures into the database conftest file
-Refactored comments in database.py
-Refactored queries in database.py to have better style and santization
-Added comments and examples of the presentation time stamps
-Removed unused functions from database.py
-Added httpretty mock tests for database.py
-Added a database schema upgrade test
-Added tests that check multiple scenarios of each method in database.py

Related #484
-Replaced string % operator with calls to format
-Renamed _presentation_exists to presentation_exists
-Added SQL statements to test presentation_exists
-Removed several try/finally statements and replaced them with 'with's
-Fixed an exception logging statement which referred to an out of scope
value
-Cleaned up some tests related that were modified earlier this evening
Fixed spacing.
-Changed the formatted log strings back to using the % operator