Here's how Mattel agreed to party with Greta Gerwig and Margot Robbie's vision for Barbie.