For years, Tim Cook insisted Apple could change China from the inside. Instead, China changed Apple.