Quiz/QuizAttempts controller acount for nested json

* If content-type is set to application/json, then rails will
  automatically parse it. Otherwise, problem contents will be a string
  that needs to be parsed. The controller endpoints now account for both
  cases.
* Tests added to consider the case
* Change is trivial enough that it doesn't need a code review