Simplify I/O

Simplify GraphReader and GraphWriter;  cut memory usage by eliminating duplicate storage of graph structures when reading graphs