Quick fix for 'KeyError: "flagged"' on new session

Fixes #185. We need to set the flagged variable on login, since
most people will clear sessions between checking for replies.
Simulate session logout in test_reply

Realistically, clients will clear sessions between submitting
docs / checking for replies, so we should simulate that.
test.py will now fail before 195d0ef and pass after, as
expected.
Add session-clearing to all tests that need it

Add test for logout (clearing a session) in the source
unit tests. Also clear sessions in integration tests
whenever a source/journalist is probably going to
close their browser.
remove direct links to external sites from source templates, fixes #195
Merge pull request #206 from pemulis/master

remove direct links to external sites from source templates, fixes #195
Merge branch 'master' into fix/flag_keyerror
Remove unnecessary path check, add reasoning for _logout
Simpler solution to avoid KeyError
Merge pull request #188 from diracdeltas/fix/flag_keyerror

Fixes #185 and modifies tests to clear sessions whenever a source/journalist will likely close their browser.
Merge main repo master into this pull request