Modify JSON method so that article counts of categories are returned along with the category names.

For simplicity, and to maintain backwards compatibility with anything that is consuming the current category JSON (which I think includes the indexer minion), I added a new dict "counts" to the output instead of decorating the categories directly with the counts.

I think this code is ripe for a complete refactor, but since we're launching this feature soon (with the new PLOS ONE homepage), I opted to work within the existing design.

TODO: "roll up" article counts recursively for non-leaf categories.
Use Pair instead of CategoryCount for results.
Calculate article count for categories recursively--that is, the count includes not just articles tagged with that term, but also the count of all descendent terms.

The logic is complicated by the fact that the category hierarchy is not a tree.  Nodes can have multiple parents.
Don't do the recursive-roll-up thing for taxonomy browser article counts.  Just use the raw count, since this is what solr search does.
Merge branch 'dev/plosone-homepage' into dev-FEND-1219
Move my changes for View All Articles into the ambra webapp.
SE-285 rename the method for getting the list of figure and tables
SE-285 updated unit test
Merge branch 'master' into dev-FEND-1219
I wasn't really 100% happy with the prior implementation, so I cleaned things up a bit, AMEC-1688
Implement article counts.  Delete code related to my earlier, erroneous attempts at this.

In order to match the number of search results on browse pages, I had to issue a new solr query that looks at the subject_facet facet instead of subject_hierarchy, which is used to populate the taxonomy browser.  However the results of this query are cached for 24 hours, just like the "main" taxonomy browser query.
A little more refactoring and adding methods / classes to remove a flag, AMEC-1688
Merge branch 'master' into dev-AMEC-1688
Fixing some SQL syntax and edge cases AMEC-1688
Added some debug logging AMEC-1688
Allowing some error messaging to pass back through the JSON response AMEC-1688
Adding URL rewrite for deflag, AMEC-1688
UI and JS implementation and some CSS cleanup, AMEC-1688
Removing an edge case, AMEC-1688
Merge branch 'master' into dev-SE-285