As the expectations of online shoppers rise, mastering the last mile is logistics’ main challenge. Doing so requires scale and proximity