More robust implementation of 'Content-Type' overriding.

The previous approach of just including the content type and length in the regular header list was shortsighted and broken. This is basically a revert of 34d84ec3985cfd7b374bb851bd0d962c8504c31c which then adds the overridden content type directly to the TypedOutput.