Rewritten saving/loading mechanism.

While saving data, they are converted to simple arrays of integers, so it is not needed to determine structure of the graph. When loading, informations about graph structure are reconstructed from that arrays. Loading is now 2 times faster than before.