Expands ProfileManager and profile unit tests

Methods for deleting, creating, and listing
profiles. Also modifies get_profile by adding
an extra arg to specify whether a non-
existing profile should be auto-created.

Adds unit tests to test_profile.

Methods added:
- create
- list_profiles
- delete

Related to #632
Add database.py tests and refactoring

- Remove test methods that only check function return types

- Create resources folder for common test data like test rss feeds

- Fix database.py query bugs

- Add database folder for database related tests

- Refactor common database fixtures into the database conftest file

- Refactor comments in database.py

- Refactor queries in database.py to have better style and sanitization

- Add comments and examples of the presentation time stamps

- Remove unused functions from database.py

- Add httpretty mock tests for database.py

- Add a database schema upgrade test

- Add tests that check multiple scenarios of each method in database.py

- Replace string % operators with calls to format for nonlog string formatting

- Remove several try/finally statements and replaced them with 'with's

- Fix an exception logging statement which referred to an out of scope value

Related #484