richMode: fix an issue with selectall

For whatever reason, it seems selectall was happening asynchronously or
something in Chrome (possibly others, too, although I didn’t check).
setImmediate was too fast, and the selection was checked for
differences before it had a chance to change; thus, the selectionchange
event was not being fired when selectall happened. This commit fixes
that by manually handling selectall.
richMode/enter: fix an issue removing paragraphs
richMode: handle backspace/delete