Add a check for boundary rules for QUERY (tornado)

Also try to clean the warnings in  https://gist.github.com/msmith-techempower/8362921.