Fix a case mismatch in one of the tests
De-dupe pie chart view

Pull logic into the controller from the view. There were only a couple
of tiny differences between the running actions and the total actions
view, so I added a couple of instance variables and then called the same
template twice.
Turn unreferenced ivars into local variables
Shave off slight redundancy
Extract pie chart data logic into model layer

Move most of the tests for this logic into the unit test layer.
Extract methods in pie chart data model
Fix failing tests
Merge pull request #176 from kytrinyx/refactor-pie-chart

Refactor pie chart data
Merge remote-tracking branch 'upstream/master'