Draft rules on the export of artificial intelligence technology show how China is trying to balance national security risks with its desire to outpace the United States.