Distribution Compression in Near-linear Time