Adaptive Nearest Neighbor Machine Translation