Register the stats JS code

Lots of repetition here, should be refactored somehow.
Restore “Expand details” functionality
Adapt the templates to JS progress bar
HACK: get progress bars to show
Fix getting permissions of the main page
Fix table zebra coloring

Iterate only on the direct children <tr>s or the first <tbody>, since
the progress bar is now a table inside the table and we do not want to
iterate over its <tr>s.
HACK: Fix progressbar in language pages
HACK: Fix project progressbars in main page
All tables have stats, so remove the check
Show all languages

Since we no longer build stats at page load and can’t check the
translation percentage.
The tooltip is no longer used
HACK: pass an item.code for goals

Still not working
Kill more unneeded get_stats
Fix sort key in the front page
Update project summary using AJAX
Unused import
Cleanup: small nits
Log "delete from cache" actions, add store.pootle_path to unit log params, get cached last_action only when unit is deleting
Cleanup: PEP8 fixes
Set unit_id as last action attribute. Fix #38.