Anatomy and resilience of the global production ecosystem