Dramatically improve dashboard query performance with relation columns.

The "Target People", "Target Groups", and "To Me" columns each added one query
per row. This change adds some smarts to the database accesses. The "To Me"
column now caches all of the directly-assigned review requests into a list
which is stored in the datagrid state. The target people and target groups
columns now do a prefetch_related() to have only one additional query for the
column, rather than one per row.

Testing done:
- Loaded the dashboard with all of these columns enabled. Before this change,
  for my particular set of review requests, it ran 29 queries in 25ms. After
  this change, the same dashboard ran with 11 queries in 12ms.
- Ran unit tests.

Reviewed at https://reviews.reviewboard.org/r/6490/
Merge branch 'release-2.0.x'
Fix filename parsing when git filenames include spaces.

This is not perfect, but this should fix 99% of the cases. This will still show
incorrect filenames if path looks like /path/to b/your/file, but hopefully that
should be pretty rare..

Testing Done:
Tested with the dev server.

Fixes bug 3558.

Reviewed at https://reviews.reviewboard.org/r/6466/
Merge branch 'release-2.0.x'
Fix selecting text within a single line in the diff viewer.

The new text selection code only worked if the selected text had a <tr>
in it. If it didn't, we'd end up with an empty clipboard.

We now check for this condition, and just grab the text contents of the
selection.

Fixes bug #3631
Reviewed at https://reviews.reviewboard.org/r/6492/
Fix navigating to comment flags through key bindings in the diff viewer.

The support for navigating to comment flags using key bindings was
broken, due to looking up the wrong class. The class name has been
corrected, allowing navigation to work as expected.

Fixes bug #3626
Reviewed at https://reviews.reviewboard.org/r/6493/
Improve summary search speed on large installs.

Search for summaries in the quick search is very slow, for a couple of
reasons. We didn't have an index on the summary, but even if we did,
we were looking for text in the middle of the summary field, which
indexes can't help with.

This could cause real problems on large installs, slowing down the
database making it nearly impossible to find what you're looking for.
Continuing to type would trigger further expensive queries, eventually
resulting in other queries stalling on the server.

To fix this, we now have an index, and we now search only the beginnings
of summaries. We also only start searching if we have 4 or more
characters. It limitation on where we search sucks, but it's better than
nothing.

Theoretically, we could use the search index, but more work must be done
to make that happen.

We could also, theoretically, use the full-text search feature for
MySQL, but not all versions support that for InnoDB. Work would need to
be done to introspect whether we can use full-text search, and it would
require hand-applying some SQL to the database. It also wouldn't buy us
anything for other types of databases.

This may limit the usefulness of quick search for summaries until we
come up with something clever, but at least it won't break servers.

Fixes bug #3619
Reviewed at https://reviews.reviewboard.org/r/6494/
Fix problems in hardened password storage.

The password storage had a couple of bugs when saving empty passwords.

If a password was not set, but we tried to store it, we'd get '\tNone'.
This was due to always prefixing with the encrypted password marker, but
not actually encrypting the string. This would then break when we went
to load it, since 'None' wasn't an encrypted password.

We have to work around the loading, so we now check for '\tNone'. Sucks,
but now necessary. Down the road, perhaps we can convert any that are
busted during upgrade.

Storage has been fixed to serialize None values correctly.

Reviewed at https://reviews.reviewboard.org/r/6495/
Fix warnings about naive datetimes.

When we added timezone support, we updated almost everything to use it. The one
thing that was missed was the widgets in the admin dashboard, since we didn't
look at them too much. This meant that the log files were getting spewed with
warnings any time a user viewed the dashboard.

Testing done:
Viewed the dashboard and saw that there were no more naive datetime warnings.

Reviewed at https://reviews.reviewboard.org/r/6497/
Fix searching for screenshot/file attachment comment text in the admin UI.

We were referencing incorrect fields in the admin UI for the search
field used to search screenshot and file attachment comments. We now
reference the correct field, restoring search functionality.

Fixes bug #3616
Reviewed at https://reviews.reviewboard.org/r/6496/
Only set a DB index for ReviewRequest.summary.

The previous change I had for adding an index for search added it in
BaseReviewRequestDetails. While we didn't need it for drafts, I figured
it didn't hurt.

However, it exposed a bug in django-evolution, where, presumably due to
the base class, applying the change to ReviewRequest's signature also
affected ReviewRequestDraft's.

I don't have a fix for that yet in django-evolution, so for now, I'm
splitting that field out and turning indexing on only for
ReviewRequest.summary.

Reviewed at https://reviews.reviewboard.org/r/6498/
Added alphabetic pagination to users list

The usergrid object triggers the paginator in djiblets to turn on alphabetic
queries by providing a current_letter parameter to the DataGrid. If there is no
letter parameter passed into query string it defaults to 'A'. The users_list
function (in views) is reponsible for catching a letter parameter in the query
string (including catching and throwing errors), and filtering the queryset
accordingly (ie. filter for names starting with 'A') before passing it to the
datagrid.

Testing Done:
- Manually tested button behaviour of first last, next and back arrows.
- Unit tests for the user list are updated to test new features and all pass.
- All unit tests pass.

Bugs closed: 829

Reviewed at https://reviews.reviewboard.org/r/6368/
Merge branch 'release-2.0.x'
Add release notes for Review Board 2.0.10.

This covers all the fixes and optimizations made since 2.0.9.

Reviewed at https://reviews.reviewboard.org/r/6499/
Release Review Board 2.0.10.
Merge branch 'release-2.0.x'