Move content-type setting to controller plugin.

This tries harder to avoid any duplicate setting of the content-type
header, which breaks fastcgi setups.