Automakers such as Hyundai are partnering with Amazon to allow customers to buy cars on the retail giant’s site.