Revert to SHA1 hashing for stored passwords

This is required for the old style community auth system that is still
in use by the commitfest app. Once that has been retired or upgraded,
this patch should be reverted.

Existing passwords are automatically converted once the user logs in to
the main website once.
Fix creation of new objects with notifications that have ManyToMany relationships

This broke in django 1.4 since it fires based on the contents of an error message,
and the message changed. Most visible due to the fact that it completely broke
creation of new organsation objects.
Update community authentication to pass an arbitrary datablock instead of url

This makes it possible to pass URLs that will fail when they end up being double
escaped in some cases, since they contain non-url-safe characters. Instead, they'd
be base64-encoded, and thus safe.

Also update the django community auth provider to do just this, including encrypting
the data with the site secret key to make sure it can't be changed/injected by
tricking the user to go directly to the wrong URL.
Typo fix
Make it possible to pre-select a mailinglist in the subcription form

This is done by putting #<id> at the end of the URL.
PostgreSQL 9.3 beta 2.
Ensure db connection is closed before script exits

This is required in django 1.4, but was closed automatically back
in 1.2 when it was created.
Exclude some URLs from the archives in robots.txt

This makes no major changes from what was there before from a pure search
perspective:

* /message-id/flat/ was already flagged with a META tag to  be excluded from
  indexing, since it's the same data as /message-id/.
* /list/ was already flagged with a META tag to be excluded from indexing,
  since it carries no actual content, just links, and the links and descriptions
  of the lists is already available under /community/ as well.
* /message-id/raw/ required a login so it produced a bunch of 401's anyway,
  but this way we don't need to probe for that.

It's more efficient to block these things in robots.txt so we don't have to
spend the processing power to render a page that's not going to get indexed
anyway.
use 9.2 as default for the various linux distribution installation,
instructions - we might want to automate this but it is not immediately
clear on how so this will do for now.
cosmetic fix - use non obsolete versions in explaining out versioning schema
fix typo - note by Stephen Frost on IRC
bring the example code for the mediawiki plugin more in line with what
we actually use in production, this mostly consists of the "new style" support
for raw data passthrough, but does not fix the actual problem (which is dealing
with url "double" encoding/decoding - or rather the loss of information about
that) yet...
Will fix that and sync up exactly with the production code for MW 1.19 soon...
Remove extra closing tag
Indicate unsupported versions in RSS feed
Use a proper database field for beta releases

This replaces the previous ugly hack where beta versions had a negative number
as latestminor, giving a much cleaner model.

Requires SQL:
ALTER TABLE core_version ADD COLUMN beta boolean NOT NULL DEFAULT 'f';
ALTER TABLE core_version ALTER COLUMN beta DROP DEFAULT;

(Yes, we really need to move to something that can do automatic migrations)
Explicitly list beta and development versions in docs as "devel"

Previously we listed both those as unsupported, which confused some users
particularly with new beta releases. While they are technically not supported
yet, it gave off the image that specific features would not be in newer
versions anymore, since they got listed as unsupported.

In passing, fix the style of the links in case they only exist in old
versions, which would put an extra | character in the version list.
Indicate survey posting date on survey result page

Fixes #207
Include development and beta versions in search indexes

This includes both the sitemap used by google and friends and our own
site index, which uses the sitemap to decide which URLs to crawl.

Fixes #171
Closes #172
Don't generate broken links to /docs/0.0/ in the sitemap

Generate proper /devel/ URLs, and then exclude them again in robots.txt
so we don't include them in google results, but we do include them in
our own.
Make an actual foreign key between docs versions and core versions

This was originally not done because we had a lot of old legacy data
that didn't have entries in both tables. This is no longer the case,
and the docloads script already enforced that it couldn't happen again.

Requires SQL:
ALTER TABLE core_version ADD CONSTRAINT version_unique_tree UNIQUE(tree);
ALTER TABLE docs ADD CONSTRAINT docs_version_fkey FOREIGN KEY (version) REFERENCES core_version(tree);