add clone method in Utils

Copied from the latest nightly build of gs-core (should be dropped when
updating to gs-code 1.3 and use Graphs.clone(Graph graph) instead).