_sort now warns if you have a bad parameter

The previous checkin was causing _sort to cope with an empty parameter,
but it was swallowing the error silently.  So instead, I enhanced
QLParser to cope with things throwing PublicException, and doing the
right thing.  This will *vastly* simplify a lot of code, and lets us
show the proper warning in this case.

To support this, did a bit of enhancement to the exception-handling, so
that we can render PublicExceptions outside the Play front end.