Fix retina.js with images not currently visible on the page.

retina.js has a bug (which has a few issues and pull requests filed)
where any images not currently displayed (either through display:none on
the image or on a parent) will end up with a width and height of 0.

The solution appears to be to use the naturalWidth and naturalHeight
properties instead of offsetWidth and offsetHeight. Others have deployed
this without problems, and it works for the cases I've hit as well.

The problem is that we now have to maintain this, but hopefully the next
time retina.js puts out a release, it'll include a fix.
Fix incorrectly calculating the number of issue counts.

The query for calculating the number of issues led to duplicate results,
which could cause the returned issue count to be abnormally high.

This only happened when reviewing more than one type of thing. For
example, a diff and a file attachment, instead of just a diff or just a
file attachment.

The reason is that the query would return one result for each comment,
but that result would contain issue counts for each type of comment. So,
if commenting on 2 diffs and 1 file attachment, there may be a result
for diff comment 1, and diff comment 2, but both may include the issue
status for file attachment comment 1 as well.

What we needed to do was filter out comment entries we've already seen.
To do this, we request the comment IDs along with the issue statuses.
During processing of issue statuses, we check and see if the comment ID
for the status is one we've already seen. If so, we'll skip that issue
status.
Modernize the display of the "Review request changed" boxes.

The "Review request changed" boxes haven't been touched since they were
first introduced back in 2006 or 2007. Since then, we've added file
attachments, improved the information available on diffs, introduced
Markdown, and added extension-provided fields. All of which the old
boxes did a terrible job at representing.

This introduces a complete overhaul of the design and capabilities of
these boxes. Every bit of information is now more detailed, making it
easier for people to see exactly what has changed at a glance.

Text area fields, like Description, are now rendered as Markdown, but
presented in a unified diff format. It's easy to see what changed in the
text, and to even see small changes like a corrected word within a line.
This works much like the diff viewer, except not side-by-side.

Simpler text fields, like Branch show the before and after, one on top
of the other, helping to see what changed. These are also presented in a
diff-like view, though much smaller. By placing one above the other,
instead of one to the side of the other, it's easier to see what has
changed.

Lists share the same design as the text fields, except there's one row
per removed entry and one per added.

Diffs are greatly improved. An uploaded diff still shows the revision, a
link to the diff, and the "Show changes" link. Along with that, it now
shows the raw insert/delete count, and a partial file listing, complete
with complexity icons. If the diff hasn't been viewed yet, the
complexity icons just show the proportion of inserts/deletes, but after
it's viewed and the lines are calculated, it'll show the same
information that the diff viewer shows.

File attachments now show the thumbnails for the files that were added
or removed. These are just like the ones on the review request file
listing, but without the editing capabilities. They do have reviewing
capabilities, though, so a user can immediately begin reviewing the
added files without going to the main file listing.

Fixes bug #2045
Add a missing import for SignalHook in reviewboard.extensions.hooks.

We're advertising SignalHook, but we never added our own import for it
so that extensions could import directly from
reviewboard.extensions.hooks. This adds the missing import.
Set the BRANCH and TRACKING_BRANCH for .reviewboardrc on release-2.0.x.
Merge branch 'release-2.0.x'
Replace a tab with spaces in grids.py.

One of the recent changes made during the sprint introduced a tab
instead of spaces for indentation. This just changes it back to spaces.
Use 'cvs rls' to check repository existance rather than checking CVSROOT/modules.

The CVSROOT/modules file is not available on every CVS server, which makes it
impossible to add some repositories. This change fixes check_repository to use
'cvs rls' instead. If this command succeeds, we know that there's an accessible
cvs server at the given cvsroot.

Testing done: Added the cvs cvs to my local server.

Fixes bug 1986.

Reviewed at https://reviews.reviewboard.org/r/5392/
Backport python-ldap unicode fixes to release-1.7.x, add to LDAPBackend.

We had made a fix on master to encode username/password/etc before passing them
into python-ldap for the ADBackend, but never made a similar fix for the
LDAPBackend. This fix also was done on master, rather than release-1.7.x.

Fixes bug 3256.

Reviewed at https://reviews.reviewboard.org/r/5513/
Handle LDAP users who don't have email addresses configured.

When a given field isn't defined for a user, the result from ldap searches will
not include that key at all. This means that in the case of users who don't
have an email address set, they won't be able to log in to Review Board.

This change handles KeyError in get_or_create_user when using a special email
attribute and logs the error instead of failing.

Fixes bug 3257.

Reviewed at https://reviews.reviewboard.org/r/5512/
Merge branch 'release-1.7.x' into release-2.0.x
Merge branch 'release-2.0.x'