revlog: add function to slice chunk down to a given size
It is possible to encounter situations where the slicing based on density did
not achieve chunk smaller than the 4*textlength limit. To avoid extra memory
consumption in those cases, we need to be able to break down chunk to a given
size. Actual caller comes in the next changesets.
revlog: extract density based slicing into its own function
We are going to introduce another slicing step. We start by extracting the
existing one into its own function.