Amazon has abruptly canceled its contracts with three major delivery firms, a move that will put more than 2,000 people out of work and may signal a shift in how the online retail giant plans to deliver millions of packages to homes across the country every day.