Quote filename in git-cat-file error message (in batch mode)

When using git-catfile in --batch, --batch-info, or --batch-command mode we expect a response in the format (when using the default format):

<oid> SP <type> SP <size> LF
<contents> LF

This is totally predictable in any situation, even for revisions that contain a newline.

But it might happen the revision is not found. In that situation the following line is returned:

<object> SP missing LF

Since the object is returned in this response, a newline might be included. This is a problem.

Proposal

Because the <object> might include a newline (or more), escape the <object> if it does. This is similar to what git-ls-tree does:

100644 blob f76dd238ade08917e6712764a16a22005a50573d	blurp
100644 blob b6fc4c620b67d95f953a5c1c1230aaab5db5a1b0	"to\non"

From git-ls-tree man page:

pathnames with "unusual" characters are quoted as explained for the configuration variable core.quotePath (see git-config(1))

NOTE: This piece is mentioned when -z is not given, while the suggestion here is to add it when -z is given. But I would argue it's accepted because we're talking about an error message and it's weird to not use spaces in that situation.