[graph] fixes to louvain refreshing too much

Also, fixed graph comparison function.

This should be both fast and more exact now (previously it only
compared node/edge list sizes, now it compares their appropriate
hashes).
parent 66b95fcb
Pipeline #3635 failed with stage
in 0 seconds