Create new range when restoring selection with `selection.selectMarkers`

This is needed because the editor might not have focus when restoring a selection, e.g. in the tests.
Fix failing Firefox test by using `scribe.setContent` instead of `scribe.insertHTML`
Tidy up
Re-use `selection` object
Remove redundant if condition
Tidy up