Score-Based Density Estimation from Pairwise Comparisons