General Motors is to close its Indonesian car factory after 80 years, axe 500 jobs and re-focus its branding on SUVs.