Amazon said Friday it was buying the self-driving car tech startup Zoox, in an effort to rev up the drive for autonomous ride-hailing and compete against rivals like former Google car unit Waymo.