Adding timing logging output in dev_settings.
Optimized the subtitle language page (#756)

Call video.prefetch_languages(), and made the code use
languages/versions that gets cached from that call.
Speedup for SubtitleLanguage.get_widget_url()

This call was actually taking a substantial amount of time.  So now it
just returns an easy-to-calculate URL, and that URL redirects to the
full URL for the old editor.
Speedup loading versions for the subtitle language page

Added SubtitleLanguage method that gets all versions, and optimizes
them (set's their cached video/subtitle_language attribute).  We use
this to get all versions with 1 query in the page, including the
current, and next version, and tip version.
Speedup for Video.get_team_video()

When we get the TeamVideo object, we set it's video attribute so that
we don't need to re-fetch the video from the DB.
Optimized the scripts block for the language page

We were doing a ton of redundant queries there.
Slight speedup for getting the previous version for subtitles

I was hoping that this would speed up the subtitle language page
substantially for languages with a lot of versions, but it's really
just a minor thing.
Moved subtitle rendering to a django filter

This is less clean than rendering it in a template, but significantly
faster.  It saves about 30 seconds for me when rendering a version
with 3000 subtitles.
Removed a bunch of cruft relating to the video language page

We had code to handle going to the "video history" page, without a
language.  I'm not sure why this made sense in the past, but it
doesn't make sense now and it wasn't used.  Removed a couple unused
functions/templates.  Changed the rest to simply redirect to the video
page, which is what we were doing anyways.
Speedup language revisions (#756)

Calculating revisions takes a significant amount of time for the
language page, especially when there are many revisions and lots of
subtitles.  This commit makes two changes to make us handle language
revisions better:

  - We don't load the revisions until the revisions tab is clicked
  - We paginate revisions
Improve the info line for subtitles

Don't show the translation source.  Showing this adds almost 10
DB queries to the request.

Refactored how we display the info line so that it's possible to be
translated.
Load subtitle language tabs using AJAX
Don't use a placeholder gif when switching tabs with ajax.

Most of the time we switch so fast that the placeholder is just
annoying.  Blanking out the tab seems like it's a good enough visual
indicator that something is going to change.
Cache tab contents so we only need to load them once.
Fixed some issues with the new language page code

Put back in the time/text changes.  Made the code use the new
calc_changes() method, which is faster than calculating the entire
diff.

Fixed the LanguagePageContext objects so that setup_tab() wouldn't
call setup().  The whole point of that method is to avoid the extra
overhead.
Refactored AHAH tab loading.

I want to use the same technique for the video page, so I figured it
was worth the effort to clean it up a bit.
Slight cleanup of the LanguagePageContext.

There's no reason for this not to be a member function.
Fixed logic error when updating the video view counter
Made the video page load tabs using ajax as well
Optimized the videos page a bit.

The page was actually reasonably fast, but I did a couple things to
speed it up:

  - Call video.prefetch_languages
  - Removed stale code for no-longer functioning javascript on the page
  - Cached the comments count