added POST submission code, also fixed quiz url function to return the correct url given the circumstances
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
Merge branch 'master' of https://github.com/Eduki/eduki into create-quiz