Fix DOMDocument::createElement{,NS}

Summary: Use registered class to create new elements.

Fixes #2962

Reviewed By: @sgolemon

Differential Revision: D1657409

Signature: t1:1657409:1415147180:2a159c68faf214dc7fb21f94a956c14400cc17b4