HyperLogLog - Analysis of a Near-optimal Cardinality Estimation Algorithm