Convenient function to initialize, at construction time, a GomElement using given local name and document.