Do not call memcpy with nullptr in SimpleBuffer::Read() and Write().
Do not call memcpy with nullptr in SimpleBuffer::Read() and Write().

"If either dest or src is an invalid or null pointer, the behavior is undefined,
even if count is zero" according to
https://en.cppreference.com/w/cpp/string/byte/memcpy.

In Write(), if `size` is positive, then Reserve() guarantees that destination
will never be nullptr.  If source is nullptr and `size` is zero, then the newly
added early return prevents the memcpy call.  If source is nullptr and `size` is
not zero, that is the caller's fault.

In Read(), if `bytes` is nullptr and `size` is zero, then a newly added early
return prevents the memcpy call.  If `bytes` is nullptr and `size` is not zero,
that is the caller's fault.  If `read_ptr` is nullptr, then `read_size` will be
zero, triggering the newly added early return path.

This is covered by existing tests in UBSAN mode, which are never actually ran in
UBSAN mode, but will be on Envoy CI soon.

PiperOrigin-RevId: 449057984

google/quiche,google/quiche,google/quiche,google/quiche