Amazon agreed to pay $2.5 billion to settle Federal Trade Commission allegations that it duped customers into signing up for its signature Prime service and made it very difficult for them to cancel.