Starboard Value LP has amassed a stake of about $350 million in CarMax Inc. and sees an opportunity to accelerate the used car retailer’s turnaround under incoming Chief Executive Officer Keith Barr.