add constants for bitmask returned by CompareDocumentPosition
support a nil `before` node in InsertBefore