stop_list.c: various minor fixes

Fixes the type of dist to match the return type of prv_dist_sq, to fix
the integer overflow that still exists.  Also removes another magic
number.