Fix a response header bug in the error middleware

Coerce the Content-Length of the custom error message to a string, not an
integer.  Some pure Python WSGI servers aren't strict and violate the WSGI
specification by automatically converting the value to a string.  Apache,
however, *is* strict, and considers this a 500 Internal Error

Fixes bug 1306963

Change-Id: I9b82ceee096b00c21c3b230dc67701bc40629968
(cherry picked from commit 381d9ba941e93386000dd29b9426358efb7713f7)