Prototype complete.

Both MC-QUERY and PMF-QUERY working, with MEM, APPLY, and
DPMEM.