The airline turned a modest 1980s rewards scheme into a $10 billion ecosystem that keeps millions hooked despite frustrations – and it’s about to turn 40.