From stamping out trolls to removing fake bot accounts, here’s how social networks are waging war using AI weapons.