osd/ECBackend: fix iterator invalidation in omap_get
The removed_ranges erase loop in omap_get() called erase(out_it->first),
which invalidates out_it, then did ++out_it on the dead iterator (UB).
When adjacent keys were erased this skipped keys that should have been
removed:
Extract the loop into a static remove_keys_in_ranges() helper so it can
be unit tested without an ObjectStore, and rewrite it as a range erase:
removed_ranges is a sorted map of non-overlapping [start, end) ranges.
Fixes: https://tracker.ceph.com/issues/78177 Signed-off-by: Sun Yuechi <sunyuechi@iscas.ac.cn>