Optimal Expected-Time Algorithms for Closest-Point Problems