Fixes intermine/intermine#450

This was due to the accidental gazumping of the QUERY session parameter
due to unnecessary usage of a PagedTable
Slightly more careful scoping of the query var.

Probably unnecessary, but it isn't going to hurt.
Log all debug messages in web.logic.

Because that is why we have a testmodel webapp.
Merge branch 'dev' of github.com:intermine/intermine into dev