Perform unicode migration for reviewboard/testing

This change represents an audit of all of our string literals to make sure that
bytestrings are annotated with a leading 'b', and then adds
"from __future__ import unicode_literals" to the beginning of every non-empty
file. This also includes some changes to to use six.text_type for python 2/3
compatibility.

Testing done: Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/4974/
Perform unicode migration for reviewboard/admin

This change represents an audit of all of our string literals to make sure that
bytestrings are annotated with a leading 'b', and then adds
"from __future__ import unicode_literals" to the beginning of every non-empty
file. This also includes some changes to handle string/byte types when
communicating with memcached, some changes to use six.text_type for python 2/3
compatibility, and marking some additional strings for translation.

Testing done:
* Ran unit tests
* Smoke tested admin

Reviewed at https://reviews.reviewboard.org/r/4958/
Perform unicode migration for reviewboard/scmtools

This change represents an audit of all of our string literals to make sure that
bytestrings are annotated with a leading 'b', and then adds
"from __future__ import unicode_literals" to the beginning of every non-empty
file.

This also includes some changes to use six.text_type for python 2/3
compatibility, marking some additional strings for translation, and changes
some file opens to use 'with'.

Testing done: Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/4968/
Perform unicode migration for reviewboard/webapi

This change represents an audit of all of our string literals to make sure that
bytestrings are annotated with a leading 'b', and then adds
"from __future__ import unicode_literals" to the beginning of every non-empty
file.

This also includes a number of changes to use six.text_type for python 2/3
compatibility, using 'with' for file opens, as well as some clean-ups to use
raw strings when testing escaping.

Testing done: Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/4975/
Do a bunch of cleanup in contrib/

This change does a bunch of cleanup that we've done in review board but
neglected to do here, including:
- Unicode string migration
- Print function migration
- Remove selenium crud
- Make sure all commands run their code from an "if __name__ == '__main__"
  block.
- General import maintenance and cleanup
- Pull in "input" from six.moves
- Make the extension generator create code with the above improvements

Testing done:
- Verified common scripts still did their thing
- Generated an extension and checked the output

Reviewed at https://reviews.reviewboard.org/r/4977/
Remove an extra file from a merge.

This file ended up here through some merge, and shouldn't have been
here. It's been removed.
Add missing CSS and image files for CodeMirror and jquery-ui.

Apparently, these never got committed. How nobody ever noticed, I cannot
even guess.
Perform unicode migration for reviewboard/reviews

This change represents an audit of all of our string literals to make sure that
bytestrings are annotated with a leading 'b', and then adds
"from __future__ import unicode_literals" to the beginning of every non-empty
file. This also includes some changes to use six.text_type for python 2/3
compatibility, and changes some file opens to use 'with'.

Testing done: Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/4966/
Perform unicode migration for reviewboard/*.py

This change represents an audit of all of our string literals to make sure that
bytestrings are annotated with a leading 'b', and then adds
"from __future__ import unicode_literals" to the beginning of every non-empty
file. I've included some pretty simple cleanups for a couple trivial issues as
well.

Testing done: Ran unit tests

Reviewed at https://reviews.reviewboard.org/r/4976/
Add new 'absolute_url' field to Web API Resources

Add a new 'absolute_url' field to BaseFileAttachmentResource,
BaseScreenshotResource, ReviewGroupResource, and ReviewRequestResource.

Testing Done:
Unit tests passed.

Reviewed at https://reviews.reviewboard.org/r/4902/
Scroll back to the top of the diff viewer when switching pages.

The diff viewer page's scroll position would stay the same (or as close to the
same as possible with all the changes) whenever switching revisions or pages.
Most of the time this is ok (if using the controls at the top of the page, one
doesn't really expect it to scroll), but using the page selector at the bottom
resulted in having to manually scroll back up to the top. This change will
scroll back up to the index_header anchor when using the bottom page selector.

Testing done:
Switched back and forth between two pages of a diff using both the top and
bottom selectors. Saw that in the latter case, I was scrolled back up to the
file index.

Reviewed at https://reviews.reviewboard.org/r/4979/
Update link to extensions doc.

The 1.7.x documentation had a link into the dev manual for creating extensions,
which is probably where we want to be directing people, but it never got
updated when I moved the extensions documentation. Trivial fix.
Merge branch 'release-1.7.x'
Strip the line when computing the move detection minimum line length.

Move detection was considering the full length of a line when computing
line move thresholds, and that included whitespace. It now strips them,
so we don't have to deal with silly things like a massively indented
brace.
Provide pre-defined variables for .less files.

We now supply development and packaged .less files with a set of global
variables they can use when packagin. These provide a base path for
static files (to allow for importing defs and other files), debug
information, and version information, which can be used for LessCSS
guards to supply different rules for different versions of Review Board.

There's also a fix for building .less files. We didn't have
FORCE_BUILD_MEDIA set, causing issues building .less files, depending on
the development setup.