Separate the graph and edge protocols because of collision

Both WeightedGraph and WeightedEdge protocols have weight function.