BMW sales slipped last year as a costly recall compounded a slump in demand in China that has hit Germany’s automakers hard.