Refactor StatementQuery to parameterize the list of valid name spaces.
Refactor StatementQuery to parameterize the list of valid name spaces.

Also fixes some pre-existing loopholes.

sorgerlab/bioagents,bgyori/bioagents