A study found some content for terror groups was being generated by Facebook’s own systems.