But Farley’s quest to transform Ford into a leaner, higher-margin business hasn’t been without its stumbles.