Move memoizeQuery to utils.js

Otherwise it was exposed on window!
Move selectors code to lib/jsdom/living

Also fleshed out the tests, and made querySelector correctly stringify its argument.