Display absence and retired status of owners
Fix detection of extension resource content type

For extension resources (loaded via /extension-resource/$EXT/$NAME) we
detect the content type simply by looking at the filename extensions
and the list of mappings in configuration.mimetypes.MIMETYPES.  (This is
in itself not perfect; there should be some way for the extension to
declare the content types of its resources itself.)

The old code used "everything after the first period" in the full
file-system path of the resource as its extension, used to look up the
content type.  This is obviously broken, and for instance breaks down
completely if the user hosting the extension has a period in his/her
user name, or if the extension's name contains a period.

The new code looks only at the resource's basename, and also tries to
look up every possible extension, longest first.  For example, given the
resource name "a.b.c.d" it will look up "b.c.d" first, then "c.d", and
finally "d".
Add background service synchronization mechanism for testing

To avoid code that waits some arbitrary amount of time for background
services to do asynchronous work (e.g. maildelivery delivering pending
mail or branchtracker updating a branch) and thus risks test flakes
due to timing issues, add a mechanism using which tests can wait for
a given background service to return to an idle state.

The mechanism is fairly simple: create a file named <pidfile_path>.busy,
send SIGUSR1 to the service process, and then wait for the .busy file to
be deleted.

Alternatively, SIGUSR2 can be sent to force the service to also run its
maintenance tasks before reporting that it's idle.  This is not currently
used, but will be useful for testing specific maintenance tasks.
Check background service logs for errors when testing

After each test, check and report any errors (or warnings) written to
any background service's log.
Common up calls to index.processCommits()

The processCommits() function inserts a commit and all its ancestors into
the 'commits' table in the database, if they aren't already there.  It
needs to be called before running any code that expects to be able to
access commits as gitutils.Commit objects.

It was previously both from src/background/githook.py and from various
functions in src/index.py (e.g. createBranch() and updateBranch().)  Now
it's simply called on all new SHA-1s that the commit hook receives as
input.  This is effectively what it did before as well, of course, but
with less code.

Also, since processCommits() can raise IndexException, and the handler
for that exception uses the 'info' local which is first assigned after
some of the calls to processCommits(), the exception handler would
sometimes crash, and not emit a proper error message.  This problem is
addressed by this fix.
Improve error reported when reviewed commits are missing

Ignore that the commit prefetching failed, and just go ahead, which still
detects later that a commit is missing, and produces a slightly better
error message.
Add email.listId preference for setting custom List-Id header

Useful if using an email system (such as GMail) that doesn't support
filtering based on custom headers like the OperaCritic-* headers normally
set by Critic but does support filtering using the List-Id header.
Don't associate users with comment chains via filters

This will typically associate unnecessarily many users with unnecessarily
many comment chains.  Restrict the set of associated users to the review
owner(s) and any user that has participated in the comment chain (that
started it or has written a reply.)
Add support for 'email.enableAssociationRecipients' preference
Set "Cache-Control: max-age=3600" on image extension resources

This is sort of a workaround; should have a better cache control
mechanism.  But with Chrome, the Dashboard extensions favicon
animation causes extremely frequent reloads of the favicon images
due to no caching at all.
Don't include draft replies when counting replies

It would be fine (but unnecessary) if only the viewing user's drafts had
been included, but in practice all users' drafts were included in the
counters, which was just confusing.
Fix context expansion dropdowns in "Conflicts" view of merge

In a merge diff, we don't support context expansion in the per-parent
diff views, because that's a bit complicated.  Supporting it in the
"Conflicts" diff view, however, is trivial, but was broken due to some
simple issues in the code, fixed by this commit.
Fix diff on /showcomment in some rare situations

Even if reviewing.html.renderCodeCommentChain() decided that the comment
should be on the left ("old") side of the diff, diff.context.ContextLines
could decide it belonged on the right ("new") side of the diff instead,
if the chain was connected to a set of lines in the "new" file version.
Avoid this by explicitly telling diff.context.ContextLines whether the
comments belong on the left side.  (Showing comments on the right side,
when possible, is the default.)

IIRC, the asymmetry between the two parts of the code could lead to
diff.context.ContextLines not including the lines on the left, where the
comment markers should be, in the diff, if the comment was connected to
lines on the right side that were sufficiently far away.
Fix download link for binary files with multiple periods in the name

Improper use of str.rsplit() (no maxsplit argument) combined with
unqualified exception ignoring leads to no world domination.

Use str.rpartition() instead, and don't ignore exceptions.
Visualize byte-order-mark characters on first line in source files
Fix mime-type detection on paths containing periods
Fix database query profiling on incrementally rendered pages

For accurate profiling results, render such pages in one go (and with one
database session) instead.
Fix some kind of diff parsing issue involving binary files

If the last changed (or added/removed) file was binary, we'd add that to
the list of files in response to the StopIteration exception.  But when
doing this we should still break out of the loop, so we should re-raise
the StopIteration exception.
Improve error reporting in case of invalid input on /createreview
Simplify an "administrator role required" check