Modified Node.clone() to use iterative approach.

Uses BFS to clone nodes instead of recursion. Fixes #290.