Handle invalid serialized response better:

When we call the serializer on bad input, it doesn't crash (yet)
and instead returns an undef. When we tried to simply overwrite
$_[0] with the response, it crashed with 'Modification of read-only
value'. It doesn't happen when it's an empty string, only on undef.

So now we just check if it's undef, and if so, add it by unshifting.

We added a test that checks it doesn't actually crash on the wrong
thing, but also has a TODO to verify it will crash correctly (by
returning a 500) in the future.
reflect change
Merge branch 'fix/crash-on-invalid-content-to-serializer'