Switch to using the cached template loader.

The cached template loader will cache the path to a template, given a
template name. Unlike the standard loaders, which will search every
location every time, this will only search the location once per thread.

This is not a memcached-based solution, but rather local memory, so
every thread will start with a fresh cache.

In my tests, this sped up the dashboard and review request pages by
~100-120ms, after the first load.
Add a getPrototypeOf compatibility function.

Older browsers don't have getPrototypeOf, so add a compatibility
function for it. This is mostly for IE's benefit.
Move opcodes_with_metadata into a DiffOpcodeGenerator class.

This new class performs all the same functions as the original
functions. Some of the code has been moved out into helper functions
for organization issues, but the logic hasn't changed.

This is part of an effort to clean up the diff viewer code and make it
more extensible.
Create a base Differ class and move some centralized stuff into it.

The two differs now inherit from Differ. This centralizes the
"interesting line" registration, and even the interesting line header
registration.

The filetype header maps have been moved into filetypes.py.

A tiny optimization was made, which was to check the diff compat version
1 (Myers differ) first, and not second. It won't make a huge difference,
but it's silly we didn't do that before.
Move chunk generation out of diffutils and into DiffChunkGenerator.

This class handles all the responsibilities of diff chunk generation.
It's basically the same code as before, but some things were able to be
cleaned up. For example, all the nested functions are gone, and instead
are just methods of the class. Functions can access self.<whatever>
instead of variables that happen to be in scope or variables. The yields
don't have to pass chunk_index and then increment it themselves.

This drastically shortens what's in diffutils.py. It also reduces how
much populate_diff_chunks now has to do.
Increase the size of the review request actions.

The review request actions were hard to hit on smaller screens. In
general, given how important they are, they're just too small. This
increases the size and makes the more prominent and easier to hit.
Fix the upload dialogs on the review UI pages.

The upload dialogs didn't contain the Django forms needed to populate
the on-screen forms, due to not using make_review_request_context. This
function (which hopefully we can kill in the future) has been moved into
reviewboard.reviews.context (to prevent a circular dependency) and is
now used in the review UI rendering code.
Fix action event handling on the review UI page.

The review UI page didn't have the new #review_request div around it,
which prevented action registration from working. It's now added.

On top of this, the success handler has been removed for file attachment
uploading, since the new objects will just respond to events instead and
do the right thing.
Merge branch 'release-1.7.x'