[BREAKING CHANGE] Rename ve.Document.getNodeFromOffset to getBranchNodeFromOffset

Avoids confusion with getNodeFromOffset on the document node. Change
the check to use hasChildren (which is the same as "does it mixin
ve.BranchNode")

Move ce/dm shared code to ve.Document where possible.

Change-Id: I086abcfb0a4eae47bec441012c34ccb80e9cd895