Encapsulate dependencies of stats index page

In the controller, we now know the name of a single resource.

It doesn't happen to be backed by a database table, but it does know all
about the task of collecting stats, so I figured it's domain knowledge,
but I know that's debatable.

This also pulls up a bunch of scope/queries from the view up into the model layer.

Hopefully this will make it easier to write unit tests for this behavior.