Fixed DFXP time expressions (#853)
Couple of billing report fixes.

No longer display languages that aren't completed.  I was including
these in the list in case they were completed, then flaged incomplete,
and no billing record was created.  But the much more likely scenario
is that they were simple never complete.

Optimized finding languages without billing records a bit.  Now we
only do one query to find them all.

Don't include languages that have billing records, but the records are
out of the date range.
Billing report form improvements.

Changed team select to using checkboxes.  Changed type select to using
radio buttons.  Made the default type the new type.
Better layout for the billing report.

Removed id=login.  Not sure why that was there, but we don't really
want to imitate the login form.  This adds more space for team names.
Went back to a selectbox for the report type, the radio boxes weren't
looking good after the switch.
Merge pull request #861 from pculture/gh-853

Fixed DFXP time expressions (#853)
Use billing records to populate the billing report form

This is better than video activity, since it's possible no videos were
added for a team, but a bunch of languages were completed.
update tests for billing ui changes
Merge pull request #862 from pculture/billing

Billing
Changed filename for billing reports

Now that it's easy to select multiple teams, joining them all together
won't work.  It makes the filenames too long.
Refactored utils tests.

Moved things into their own test module.  A single module for all the
tests was getting crowded.  This was in preparation for some extra
tests, but I didn't end up writing them.  Still, I think the split is
good.
New system for tracking hit counts

Implemented a new way to track hit counts.  This one doesn't use
redit, it just inserts into a DB table.

The old way had a fairly complicated system for adding counts:
  - It would create a task to insert the count
  - The task would update a redis field
  - Every so often another task would migrate that field to the
    regular DB

The new system is:
  - Insert a row for the hit using INSERT DELAYED
  - Every day we count rows in the hit table for yesterday and
    aggregate them to the per-day table
  - At the start of the month we sum up counts in the per-day table
    for last month and move them to the per-month table.
  - We then delete hits older than 24 hours and per-day counts older
    than 1 month.

I think the new system should perform better than the old system.
Using INSERT DELAYED should be just as fast, if not faster than
scheduling a task.  The total number of rows in the 3 tables should be
reasonable (right now we have like 23 million rows in the per-day
table, which makes queries slow).  We avoid scheduling a task for each
hit, which was resulting in something like tens of thousands of tasks
per hour.
Switched to using the new hitcounting system

Made the video view counts use the statistic.hitcounts.video_hits
object.

Made video.get_views() use the video hits, rather than widget views.

Dropped the subtitles fetched count and the widget views count, we
decided those aren't really needed.

Removed the old hit count migration task and replaced it with the new
one.
fixed JS syntax error
Removed a couple count columns from videos/languages

We're not using these anymore
Changed post edit subtitles permissions check (#483)
Fixed AttributeError in indexing code
Updated feedback link for the new editor
Order video actions by creation date (#812)

Before we were ordering them by ID, which seems like it should be the
same, but results in the wild prove otherwise.  Added an index on
created so that the queries will be as fast.
Fixed widget download link (#473)

Also fixed the view code in case the lang_pk is not present
Remove permissions checks for activity tabs (#869)