General Motors has pulled out of the sale of its European car division, provoking anger in Germany on Wednesday and stunning the global car industry.