Add an optimization for Get() followed by Put() with a matching key.
Add an optimization for Get() followed by Put() with a matching key.

Get() does not yet erase list/map entries but replaces the object with
nullptr, so that Put() with a matching key can easily undo Get(). This
reduces the number of extra allocations from 2 to 0 in this case.

PiperOrigin-RevId: 240759861

google/riegeli,google/riegeli,google/riegeli,google/riegeli