api: change JSON mediatype to include charset

Fix #639.

I don't like the idea of adding `; charset=UTF_8` to every response media type as the other suggestions were, and there are relatively few places we actually use JSON right now that adding a constant and replacing its use seemed somewhat reasonable.