The Japanese automaker will spend nearly $18 billion over five years to accelerate its electrification plan.