Pandora’s success can be credited to old-fashioned perseverance, its ability to harness intense loyalty from users and a willingness to shift directions — from business to consumer, from subscription to free, from computer to mobile — when its fortunes flagged.