FIX: Avoid duplicated code in Document.importNode
Cleaned up recursive code in Node.clone
Copy NodeFlags data when cloning nodes

This fixes an issue caused when importing nodes with children containing
attributes, triggering an assertion [1] because is_in_doc wasn't being
copied.

[1] src/components/script/dom/document.rs:571
Added Document.adoptNode content tests
Added Document.importNode content tests