UPS announced that it will lay off 20,000 workers and close some facilities as part of its efforts to reduce shipments for Amazon.