The data of nearly all customers of the telecommunications giant AT&T was downloaded to a third-party platform in a security breach, the company said Friday, as cyberattacks against businesses, schools and health systems continue to spread globally.