refactor(distributor): extract profile stripping into sampling package (#5441)