always set content-type header before writing errors
always set content-type header before writing errors

This fixes a bug where if the ContextDecorator actually returns an error, the frontend complains that the spi backend didn't return json.
GoogleCloudPlatform/go-endpoints