The Japanese carmaker will shut its factory in Swindon in 2021, a move that will likely put 3,500 people out of jobs.