CarMax buying $50M minority stake in Edmunds