Med: libcrmcommon: Fix a segfault in internal_ipc_get_reply.
It's possible to fall out of the while loop without reading a reply from
a client, in which case client->buffer will be NULL since
pcmk__ipc_msg_append will never be called. In that case, we need to
check for NULL before accessing ->len.
There's another bug here, however. If we are reading a multi-part IPC
message and some part after the first one fails, *bytes will hold an
error code. But, client->buffer->len will still be positive since
pcmk__ipc_msg_append will have been called for the previous part. In
this case, we will take a partially received message as success.
This will fail when we try to parse the XML out of the partially
received message, but it's more obvious what's gone wrong if the reading
fails instead.