Fix caret position after shift+enter

Check for nodeBefore in ranges.js fixes `...<br>{}</p>` case. Changes in mutation.js fix caret position after shift+enter. @petrosalema