Japan’s automakers are stoking R&D investment to meet mounting demand for a staggering array of technologies. Toyota by far outpaces the pack.