Bug 934995, Speed up querySelectorAll by doing less allocations, r=bz

--HG--
extra : rebase_source : 757985381b6413257ef2bf82e7602fc6b0298545