graph_instance.[ch]: Move the graph_instance_t code into an own module.