index: use "range-extract-contents" module
index: save and restore the Range state when re-wrapping left and right hand sides

Fixes failing tests in some browsers.
See: https://travis-ci.org/webmodules/unwrap-range/builds/36802960