After years of staying out of the foldable-phone race, Apple has finally introduced a device that changes the shape of its iPhone lineup.