Merge pull request #132 from liliakai/flask-rewrite

Implement #121
Fix for issue #111

Update Apparmor config on source server to allow GPG to lock the keyring.
detection of JS warning and docs
Advise users to disable javascript. Closes #101.
Fixing indentation broadly.  Using two space javascript after
re-investigating here
http://atroche.org/post/30994290348/javascript-indentation
Fixing some wording
adding library: gritter
Including gritter libraries and css on index page
Overriding gritter css
Using gritter in warning for javascript
tor2web warning banner

This commit detects if Tor2Web is being used, and shows a warning message (with
a link to a detailed page) if so.

Closes #43
fix leaving tor2web condition flipped from debugging
fix tor2web unit test
Allow journalist to delete documents

Securely delete (using `srm`) documents at journalist's request. Uses jquery
to allow journalist to "select all". Nothing breaks if javascript is disabled.

Closes #120
consolidate to one version of jquery (2.0.4)
list collections even if they contain no documents

Now that the journalist can delete documents, it's confusing if they delete all
documents. Then the source's collection "disappears" from the main list,
leaving them with no way to reply to the source unless the source sends another
submission.

it would be better to display the number of documents in the main list, and
allow journalists to sort the list of collections by the number of documents
contained.
remove ugly outline from js warning close button
Throttle submissions using timestamps in cookies

Basic submission throttling for DoS prevention (#3). Only throttles
msg/doc submission. Does not defend against replay attacks. Minimum
submission interval is configurable in seconds.