I cast a Brain Freeze with 17 storm triggers causing an opponent to mill their entire library; however, they have Emrakul, the Aeons Torn in their deck, which, after all the cards are put into the graveyard, would shuffle the entire graveyard back into his/her library, thus negating the Brain Freeze .
Emrakul's ability is not a mana ability, therefore it goes on the stack, and players get priority before the trigger resolves. You may cast spells in response to the trigger to remove Emrakul from the graveyard. However, Emrakul's ability will still resolve, and its owner will still shuffle their graveyard into their library, even if Emrakul doesn't get shuffled in with it.
Also, you don't win if your opponent has an empty library. You only win if your opponent has to draw a card and can't.
yes, Emrakul, the Aeons Torn does use the stack you can use Ravenous Trap in response to it, but that is unlikely to cause a win (players don't lose if they have an empty library, only if they try to draw from an empty library) if you use Surgical Extraction in response to the trigger the rest of the graveyard will still be shuffled into the library
Autocard only works if you put in the full name of the card spell the name of the card correctly (hint: apostrophes have nothing to do with pluralization).
Each instance of Brain Freeze goes on the stack separately and resolves separately. Emmie's triggered ability (which, yes, does use the stack) will not wait for all the Storm copies to resolve, it will go on the stack right after the copy of Brain Freeze that mills it and resolve, reshuffling the library, between two of the Brain Freeze copies (unless the one that mills it happens to be the last one). Note that this might happen more than once.
Ravenous Trap and Surgical Extraction can both be used to remove Emrakul; however, in the case of Surgical Extraction, this does nothing to prevent its ability from resolving. (Technically neither does Ravenous Trap, but in that case there'll be nothing to shuffle back in.) Removing the source of an ability does not counter or otherwise mess with the ability.
In none of these scenarios will you win until (at the soonest) your opponent actually tries to draw a card from an empty library.
Jeff Heikkinen DCI Rules Advisor since Dec 25, 2011