Respect HTTP_ACCEPT header for content type of response.

This was introduced in #55. I've moved this function up to the AbstractController
and updated the upload controllers to use this function instead of forge a JsonResponse
directly.

Addresses #66.