A recent update to pecan made it so that controllers that don't
explicitly return anything now come with a '204 No Content' status.
This breaks one of our functional tests as we try to return the json
content of a response with no content.
This patch makes it so the json content of a response is returned only
if the content_type is 'application/json'.
Change-Id: Icf812eb4feddc88011d215c006ec58a14dae7506