Fix location-header for documents with newlines in the name

Properly urlence the Document-Id in the Location field of the
header

Based on a patch from Sean Bartell <wingedtachikoma@gmail.com>
COUCHDB-708