How AI is Transforming Cybersecurity: Opportunities and Challenges