If weights for some buckets are equal, result depends on the
initial positions of buckets in slice. Thus we sort buckets by value
using hash of the first node as a have for the whole bucket.
This is ok, because buckets are already sorted by HRW.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>