Modified Node.clone() to use iterative approach.

Uses BFS to clone nodes. Fixes #290.
Merge branch 'master' into issue_290
Added test for cloning deeply nested document.

Based on @khaing211's suggestion and test code. The test is ignored by default since it can take awhile to run.
Merge branch 'pr/292'