The retail giant is partnering with Uber and Lyft in a pilot program that is expected to challenge Amazon.