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
Fix: when downloading bulk documents on journalist interface, use the database designation for the source (closes #207)
Fix: when viewing the flag route on journalist interface, use the database designation for the source
Fix some typos.
Fixing error introduced in e68561
Warn people that they cannot use Percona with setup_ubuntu.sh
Add failing test for issue 198
Add validation on source side of journalist input
Sanitize journalist reply; test still broken
Add flashing to journalist base.html
Fix flashing for journalist base.html
Flash error to journalist if input is bad
Fix location of flashed messages
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