Query selectors

Following up on @doowb's work in #351 and discussion from @infews in #350, it seems that querySelector(All) should replace our usage of getElementsByTagName and getElementsByClassName. 

Sure, the query selectors are a little slower than using the original methods, but we are only using the methods a small number of constant times. The change seems worth the code simplification/compatibility it gets.