MODE-1800 - Added the node primary type as information to the newDocumentId() method, giving connector implementations an additional piece of information.

Should be merged into 3.1.x and cherry-picked into master.