Fix `ChunkReader::SeekToChunk{Containing,Before,After}()` if the target position is within the currently read chunk: do not clear `chunk_` until we are ready to set `pos_` and to call `src_reader()->Seek(pos_)`.
Fix `ChunkReader::SeekToChunk{Containing,Before,After}()` if the target
position is within the currently read chunk: do not clear `chunk_` until
we are ready to set `pos_` and to call `src_reader()->Seek(pos_)`.

The invariant of `chunk_` is that it is filled with data between `pos_`
and `src_reader()->pos()`. Clearing `chunk_` and exiting early while
`src_reader()->pos() > pos_` breaks the invariant and causes the next
operation to read wrong data.

Fortunately the bug did not matter in practice: `RecordReader` never
calls `ChunkReader::SeekToChunkContaining()` if the target position is
within the currently read chunk.

Also, set `pos_` before seeking to it for consistency with similar code
elsewhere. The consequence is cosmetic (affects reported `pos()` after a
failed seek).

PiperOrigin-RevId: 290685373

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