Add basics for Kryo serialization.

Added asMap function to Graph.Annotations.