[e] (0) Clean up the event loop algorithm
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=24390
Affected topics: DOM APIs, Workers

git-svn-id: http://svn.whatwg.org/webapps@8424 340c8d12-0b0e-0410-8428-c7bf67bfef74
(cherry picked from commit 097291c4738c39413e5ce56a8b4d1935fcdfd783)