A decade ago, Apple was falling fast. Now it's reached the top of the tree