Add draft and close banners to review UI pages.

The review UI pages for file attachments didn't have draft or close banners,
which made it kind of confusing, especially in the case when the review request
wasn't yet published. This change adds them, and fixes up some of the issues
that resulted from it.

Testing done:
Tested draft, public, and closed review requests with both the text and image
review UIs. Saw all the expected banners and no javascript errors.

Reviewed at https://reviews.reviewboard.org/r/6033/
Fix a simple unicode issue in CVS.

I noticed some unicode warnings in the CVS backend while running the SCMTools
unit tests. This fixes thim.

Reviewed at https://reviews.reviewboard.org/r/6051/
Fix unicode errors with utf-8 files that have svn:keywords set.

In the case where a file in SVN had both unicode characters in it and
svn:keywords, trying to fetch the files would cause UnicodeDecodeErrors when
processing the keywords. I've fixed things up to do all the regex work in bytes
mode.

Testing done:
Ran unit tests. Before the changes to svn/base.py, the new test failed with the
same error as in the bug reports we've received about this. After, the test
runs fine.

Fixes bug 3425.

Reviewed at https://reviews.reviewboard.org/r/6052/
Fix interdiff post-processing with replace chunks overflowing ranges.

When post-processing interdiffs in order to filter out unrelated code,
we had issues where replace chunks could be generated where its
orig/modified ranges weren't equal. This would trigger an assert, which
is probably good, because removing the assert resulted in a
corrupted-looking diff.

This same sort of bug could also affect equal chunks in theory, though
in practice, they weren't in as bad a situation.

The reason this was failing was that we attempted to cap each range to
the chunk's boundaries, without any regard to whether or not the lengths
needed to be consistent.

Now, for equal and replace chunks, we get the lengths of the
orig/modified ranges for the chunk, figure out the longest of the two,
cap that within the valid range boundary, and use that as the end
positions for the chunk.

This ensures that we only show the replace/equal range for the section
represented in the union of the two diffs. Anything else outside of that
will turn into a filtered-equal.

I added a new unit test that previously broke but is fixed with this
change. However, I then noticed that another unit test broke. Turns out,
it was already broken. It had resulting replace/equal chunks that didn't
have consistent ranges, and chunks overflowing the bounds. After looking
at the original chunks and throwing away the unit test's bad resulting
chunks, I created a new set based on what they should have been. This
ended up matching the results of the unit test.

I added some new sanity-checking in the unit tests to make sure that any
opcode lists we provide in the future will meet certain criteria, to
help catch such issues in the future.

Fixes bug #3440
Reviewed at https://reviews.reviewboard.org/r/6030/
Improve error handling when validating CVS repositories.

Any CVS repository validation error would appear to the user as a
"repository not found," even if the repository was found but the
authentication credentials were bad. This was less than helpful.

We now log the full error returned by 'cvs version', and we look in it
for an authentication-related error. That is then raised as an
AuthenticationError, with the details of the error shown to the user.
That can help a lot with tracking down the real problem.

Reviewed at https://reviews.reviewboard.org/r/6059/