Add indicator calculaton for distance between stops

More Scala idiomatic version:

```scala
def calcByRoute(period: SamplePeriod): Map[String, Double] =
  routesInPeriod(period)
    .map { route =>
      // for each route, get tuple of:
      // (sum of trip shape lengths, maximum number of stops in any trip)
      val (totalLength, maxStops) = 
        tripsInPeriod(period, route)
          .foldLeft((0.0, 0.0)) { (sumLengthAndMaxStops, trip) => 
            trip.rec.shape_id match {
              case None => 
                sumLengthAndMaxStops
              case Some(shapeID) =>
                gtfsData.shapesById.get(shapeID) match {
                  case None => 
                    sumLengthAndMaxStops
                  case Some(tripShape) =>
                    val lengthSum = 
                      sumLengthAndMaxStops._1 + tripShape.line.length
                    val maxStops =
                      math.max(sumLengthAndMaxStops._2, trip.stops.size)
                    (lengthSum, maxStops)
                }
            }
          }

      // per route, calculate:
      // average length of trips in km / max # of legs in any trip (total stops, -1)
      val value  = ((totalLength / 1000) / gotTrips.size) / (maxStops - 1)
      (route.id.toString, value)
     }
    .toMap
```

I didn't compile it so apologies for syntax errors.