Mazda and BMW took the top two spots in Consumer Reports' annual ranking of the most reliable automotive brands.