General Motors reported a record annual profit Thursday, just two years after the nation’s largest automaker emerged from bankruptcy with the help of a federal bailout.