Tiny Japanese artificial-intelligence startup Preferred Networks has attracted giants such as Toyota and Panasonic with its vision of a “deep-learning” future. Can it help the country restore its technological edge?