Extensible response types

The mediaTypes object is now exposed. This allows one to add custom handlers for specific media types. It also makes modifying the existing ones simpler as they use the same API.

The original `exports.{html,json,plain}` functions are still exposed to preserve backwards compatibility.