Efficient Task-Specific Data Valuation for Nearest Neighbor Algorithms