mutation_partition: make row::consume_with() exception safe
mutation_partition: make row::consume_with() exception safe

This function currently eagerly decrements `_size`, before `func()` is
invoked. If `func()` throws the consumption fails but the size remains
decremented. If this happens right at the last element in the row, the
`row::empty()` will incorrectly return `true`, even though there is
still one cell left in it. Move the decrement after the `func()`
invocation to avoid this by only decrementing if the consumption
was successful.

Fixes: #8154

Tests: unit(mutation_test:release)
Signed-off-by: Botond Dénes <a584fa4d75a0a85d721f44fb6e06315a2853b0b6@scylladb.com>
Message-Id: <20210304125318.143323-1-a584fa4d75a0a85d721f44fb6e06315a2853b0b6@scylladb.com>

scylladb/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla