_box_size now uses scipy.spatial.distance.pdist

SciPy has an optimized function for computing pair-wise distances
between points. Make `_box_size` use it.