Adding pure SQL mget().

Adding a pure SQL mget. Also adding an mget_param_row type to lubricate the
mapping of a param array to a CTE that can be JOIN'ed against for efficient
filtering.

/cc @loganlinn