Fix bug on unwrap when selection is made backwards

This fixes the odd selection changes when moving the selected nodes around.

As for the class, just initialize an instance, move nodes and call `restoreSelection()`.
```ruby
selection = new SelectionHandler()

# move things

selection.restoreSelection()
```

This wont work when deleting nodes. If we want to handle that case we should use another strategy.