This once-quiet ski town and gateway to Yellowstone National Park has transformed, balancing cutting-edge innovation and luxury with wild beauty and solitude.