interval_map: non_const iterator
The interval_map code cannot cope with iterators which change the size
of an interval. Due to this, they use const iterators. However, many
other modifications to intervals ARE ok and more efficient, nicer
looking code can be written with them.
This PR adds non-const iterators, but also adds some policing that the
size of the bufferlist has not changed over the interval.
Everything is hidden behind a template, as this changes the behaviour of interval map in a way that we don't want to use without careful testing of each instance.
Signed-off-by: Alex Ainscow <aainscow@uk.ibm.com>
(cherry picked from commit
360b079bc5e703754a7c27091370f910a78de2ba)