[e] (0) Tidy the AAA.
Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@8107 340c8d12-0b0e-0410-8428-c7bf67bfef74
(cherry picked from commit 9efab5024cffab4e6d2189bbe7f890baa858824e)
(cherry picked from commit 9cb2429bd29b777b9ea71f2f32a91a10f72fa0ed)
[giow] (3) Adjust the Adoption Agency Algorithm to not reverse the order of nodes in the document, by removing nodes that we're not recreating from the stack of open elements.
Affected topics: HTML Syntax and Parsing

git-svn-id: http://svn.whatwg.org/webapps@8108 340c8d12-0b0e-0410-8428-c7bf67bfef74
(cherry picked from commit 6e2035558ee3764f38a697a9e90e254461acd74f)
(cherry picked from commit 9fc72f8b25061c8b0a5268d1b1c3abb01e1ea51e)