Also, working at a company which actually has a deployed product with a high public profile is probably not bad. There are plenty of startups which never pan out. And there are plenty of companies out there with a single profitable cash cow and futile strategic projects searching for the next hit. Or barely running but business critical legacy projects written in Cobol, C++ or Java. Twitter doesn't strike me as particularly bad in comparison.
Also, having had layoffs is not necessarily only a bad thing. Even the best company will end up with a certain amount of substandard, undermotivated employees after a long hiring frenzy. The best thing for everyone is to let them go and hopefully blossom elsewhere.
Being able to say "I worked for Twitter" is and will be impressive to most people regardless of Twitter's future. It's not like future employers will see that on a resume think you're the one who sunk the ship (unless you do something high profile to make your negative impact public knowledge).
Also, having had layoffs is not necessarily only a bad thing. Even the best company will end up with a certain amount of substandard, undermotivated employees after a long hiring frenzy. The best thing for everyone is to let them go and hopefully blossom elsewhere.