Merge branch 'gh-704' into production
Merge branch 'staging' into production
Use id instead of created to order video actions

Since id is an auto-increment column, this should have the same
results but much quicker since it's indexed.

This should speed up the user profile page.
Speedup for adding cached_video_url attribute

The new code is more straightforward and also faster than the old
code.

This should speedup the user dashboard page, the team tasks page, and
the team dashboard page.
Merge branch 'dbtuning' into production
Merge branch 'staging' of github.com:pculture/unisubs into staging
Merge branch 'production' of github.com:pculture/unisubs into production
Merge branch 'staging' into production
Speedup for team video search index

Use a COUNT query, instead of calling len() for all_sls.

Only execute the query once for completed_sls.
Speedup SubtitleLanguage.having_non_empty_tip()

The INNER JOIN to a subquery wasn't being optimized very well by
mysql.  I think it was actually going through all subtitle version in
the DB.

Replaced it with a different subquery that returns the same results
and is optimized well by mysql.