Online algorithms that have learned how to push our emotional buttons are polarizing society—and the emerging science on the implications is troubling