Fixed a subtle bug in QL parameter handling

Bindings from the parent Parser were being evaluated by the child
Parser, producing incorrect results.  Hopefully this is fixed, but I
can't say I'm 100% confident yet.

Most of the code changes are refactorings, to be passing Invocation
around in places where we were passing params.