Reduce queries on datagrids by pre-populating a cache of fetched objects.

Many columns on the datagrid render related objects, such as a user. We
had a cache in place that would prevent duplicate lookups of objects
with the same ID, but we'd still do one query per unique ID.

Now we allow columns to collect the data before rendering, based on the
objects being displayed. By default, this will loop through the objects,
build a list of all IDs that will be displayed, and then populate the
existing cache with those fetched objects. This reduces the query count
to at max one per column for all cases using ForeignKeys.

ManyToManyFields is another matter entirely, and will take more
specialized work.
Release Djblets 0.6.20.
Bump to 0.6.21 dev.
Fix a bug with databases using longs for IDs.

Our new optimizations for ifuserorperm assumed IDs were ints. This
caused them to fail for databases where it was some other type.

Now we reverse the check and just make sure it's a User before doing a
direct compare, or otherwise we compare against the ID.
Release Djblets 0.6.21.
Lazily import User and AnonymousUser in djblets_utils.

rbssh in Review Board makes use of humanize_list in djblets_utils, but
the recent introduction of the User and AnonymousUser imports broke it,
as it then required Django settings to be set up.

This moves the import into the one function that needs it, in order to
prevent this kind of problem.

Fixes bug #2686
Release Djblets 0.6.22.
Move humanize_list into djblets.util.humanize.

The humanize_list function has been causing some problems. It's useful
outside of template tags and outside of a Django setting environment,
but things are being imported in the djblets_utils.py template tag file
that end up requiring a proper Django environment.

This now lives in djblets.util.humanize. It's still available as a
template tag, though.
Bump to 0.6.23.dev.
Conditionalize ez_setup

This makes life simpler for packagers, since most packaging tools
will ensure that the appropriate packages are available on the
system. Additionally, most packaging tools prefer not to rely on
network access (since it can mean that identical rebuilds cannot
be performed).

Built locally with 'python setup.py build' and also by applying this patch and
performing an RPM build in a network-free environment.

This is essentially the same patch as
http://reviews.reviewboard.org/r/3186/ (which was for Review Board
itself)

Reviewed at http://reviews.reviewboard.org/r/3252/
Remove an unused import.

This was reported by pyflakes.
Require Django 1.3.3.

Now that Djblets 0.7 is out, and much of our code depends on modern
Django releases, we now require Django 1.3.3 specifically. This is to
ensure compatibility without any quirks from a newer Django.
Added an Item-Content-Type header to Web API responses for list resources.

This header provides the mime-type for the item resource of the list.

Introduces a new 'allowed_mimetypes' attribute to WebAPIResources, and
starts the process of deprecating 'allowed_list_mimetypes', and
'allowed_item_mimetypes'. Any items missing from 'allowed_mimetypes'
found in 'allowed_list_mimetypes', or 'allowed_item_mimetypes' will be
appended during initialization to be backwards compatible.

Reviewed at http://reviews.reviewboard.org/r/3172