In an essay, the Microsoft co-founder sounds the alarm about artificial intelligence’s risks to safety and security, jobs and children’s well-being.