you should be able to create a QueryPage subclass in an extension, set $wgSpecialPages['specialpagename'] = 'SpecialPageClass'; , add to $wgQueryPages (I forget the exact format there), and you should be all set.
Thanks. I tried that, and when I added the $wgSpecialPages line, I got an error that MyQueryPage::isListed() was undefined. (This is a SpecialPage method.)
Subclassing QueryPage doesn't seem to be enough, since QueryPage is not a subclass of SpecialPage. This is where I got confused about how QueryPage and SpecialPage somehow get related.
DanB