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.
It's up to you whether you want to do this, but collections.namedtuple would make using valid_responses more readable.

Up near the top you'd ```from collections import namedtuple```, and then whereever the global declarations like ```logger``` are, you'd declare your namedtuple type:
```ValidResponse = namedtuple('ValidResponse', 'response type')```

And then here you can say:
```valid_responses[part_id] = ValidResponse(correct_response, response_type)```

But this becomes more nice down below where you dereference, because you can say, e.g.,
```if valid_responses[part_id].type == 'other'```
which I think would be more readable.

namedtuples can be indexed with numbers and used for tuple unpacking just like regular tuples, they just have this nice property that you can refer to their members by name, too. They can't be mutated like regular objects, though, which looks like it's fine in this code, and gives you a small efficiency boost.