Fix RangeSelection contentEquals
Use contentEquals or Object.is for deleteEach

Use the same strategy as the RangeSelection for item deletion.
Guard against no selection

No need to perform any operation if there is no selection.
Merge pull request #1409

Fix issues with selection management. Particularly, use the same content
equality when computing the the difference between the old and new selections,
and a typo.