Boston Ballet, which has been struggling both artistically and financially in recent years, got a major boost this week, when it was revealed that a so-far-unnamed donor had left the company a $3 million bequest. The gift will double the size of Boston Ballet’s endowment, and the company hopes that it will encourage other donors to be similarly generous.