errorHandler: use setHeader instead of writeHead

The errorHandler still uses writeHead for the plain text response. This can cause the following exception by node: `Can't render headers after they are sent to the client.`