Make /teams and /authors tables sortable

These tables can now be sorted by number of commits, author name, and
(somewhat less interestingly) breakdown.

Change-Id: I5f7c08c7d0d58bd70825bedfcb953547c660b59f
Reviewed-on: https://gerrit.causes.com/27199
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Rename _profile.js to _commit_set_bar_chart.js

"Profile" isn't really the right name for this; this is just a snippet
of JS that corresponds to a specific view that appears on a couple of
different pages. Give it a more specific name.

Change-Id: Ic9c59c5c04461c0555deeb51409988c3b6ff73c0
Reviewed-on: https://gerrit.causes.com/27200
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Port word cloud JS to Backbone

This is the minimal change required to the get the JS out of the bottom
of the /gerrit/tags template and into a Backbone view.

Behaviorally, it is identical to what was there before (ie. we haven't
yet implemented the per-author views, although this is important
groundwork for that) with one exception: we now pull in the stats JSON
via a separate AJAX request rather than inlining it, as it would be
cumbersome to pass it in via other means.

Change-Id: Iad6bfd68daf45ac441eec73c7b3f1c63d4f341ef
Reviewed-on: https://gerrit.causes.com/27201
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Fix JS linter warnings in _tags_word_cloud.js

The linter didn't like the decimal numbers without leading zeros, nor
the use of the `draw` function before it was declared.

That latter one is harmless, because function hoisting means that
function was certainly available in that context; nevertheless, moving
it up in order to keep the linter happy.

Change-Id: I8ea1af9c68bb991dae994cda8d39f256cc9ce16a
Reviewed-on: https://gerrit.causes.com/27202
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Show a progress bar while loading tag stats

This progress bar is shown during loading, removed on success, or
replaced with an error "flash" on failure.

Change-Id: I24ecd7ef9dcb4c8f9b79ad584b0503e816b894c1
Reviewed-on: https://gerrit.causes.com/27203
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Always return `this` from Backbone view render() calls

I keep forgetting to do this, so here it is again.

Change-Id: Ia1d42614db913367049f433f8836146e280208c0
Reviewed-on: https://gerrit.causes.com/27204
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Add first rough cut of per-author word clouds

The scaling is a bit odd for people with few words in their clouds, the
tab contents are invisible until clicked on, and we need a better
zero-state (perhaps disable tabs for users without tags a given tab?),
but this is a working first cut.

Note that I had to set explicit height on the on the subviews, otherwise
Bootstrap's hidden content panes (width 0 by default) would cause the
word cloud plug-in to go into an infinite loop trying to place the
words.

Change-Id: I618691f2b621597dc58e7171698e2fd51588f5c7
Reviewed-on: https://gerrit.causes.com/27205
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Make "from" tab pane selected at display time

This makes the tab pane (content) active, matching the active nav tab
itself. This will likely change in a future commit, where I probably
suppress the appearance of the tabs at all of they are not going to have
any content.

Change-Id: I49cded8e1fbec51aa67af55092ba1c18d966dffa
Reviewed-on: https://gerrit.causes.com/27206
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Hide word cloud panes if they wouldn't have any content in them

Change-Id: Ibc3ed112cab0492aa50aae4e08edf58e631da74d
Reviewed-on: https://gerrit.causes.com/27207
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Fix tag word cloud display for Kim

Kim's Gerrit authorname has multiple spaces in it ("Kim Douglas Clarence
Mason") and so our JS-side regex wasn't working when it came time to
generate IDs, and he wasn't getting a word cloud display.

This is evidence of how evil it is to have the logic existing both on
the server side (Ruby) and on the client. Nevertheless, for now, it is a
necessary evil.

Change-Id: Icd23b7a22015313d649f02405e3687179a194b0b
Reviewed-on: https://gerrit.causes.com/27208
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>
Improve scaling for word clouds

Make the smallest words bigger, and the biggest words smaller. This
makes things look nicer for users with very few words in their clouds,
while still keep the many-word clouds looking good (if anything, they
are more readable now due to the absence of very small fonts).

Change-Id: I62816030a3e7269ef065feb86569d37dfaea3093
Reviewed-on: https://gerrit.causes.com/27209
Reviewed-by: Greg Hurrell <greg@causes.com>
Tested-by: Greg Hurrell <greg@causes.com>