pw_ring_buffer: Avoid zero length memcpy invocations
pw_ring_buffer: Avoid zero length memcpy invocations

Updates the PrefixedRingBuffer to not invoke memcpy when the
requested size may be 0.

Bug: 536
Change-Id: I75785b8d7f80681bdc7a6b12f7a376dd5ef0ed9f
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/68587
Pigweed-Auto-Submit: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>
Reviewed-by: Ted Pudlik <c7372cc3e451acc046049fca9e050bcb2a4a3d11@google.com>
Commit-Queue: Ewout van Bekkum <638f134dbc68778d6b859fb04a64baea2b00b021@google.com>

google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed,google/pigweed