clone graph code from
http://leetcode.com/2012/05/clone-graph-part-i.html