Inline Analytics

  Display of answer distribution graphics inline on the problem page
  for instructors.

  Problem types supported for graphics:
    - MultipleChoiceResponse
    - ChoiceResponse

  Problem types supported for line item display:
    - OptionResponse
    - NumericalResponse
    - StringResponse
    - FormulaResponse
    via setting

Internal review only for now.
you could presumably just refactor the following code into a function that takes `data` as a parameter.  I'd like to see that.