Sort beacons list by distance between device and beacon.