b_rep_blk() was not versatile because there were a lot of cases
(including wrapping resulting from the insertion or deletion)
that were not supported, this actually made the function not
very useful.
Since there a no more known usages of this API function in the code, but
yet the decompression filters could make use of it in upcoming commits
let's revisit the function by leveraging b_move() to properly support
edge cases such as wrapping.
Now the function is pretty versatile and can safely be used to expand
as well as to shrink buffer when replacing existing data with new data.
There is still one known limitation to this day, <pos> and <end> have
to be contiguous (not interrupted by wrapping buffer), but that could
be improved in the future if needed.
The function assumes the caller already checked that inserted data will
fit in the buffer (removed data also taken into account).