Make sure that createElement returns a wrapper object

This patch also adds the ParentNode interface to Element, Document and
DocumentFragment.