More work on multi-pass query logic
First complete 2-pass execution implementation
Refactor criteria API

Explicitly define each criteria type
Add built-in equals check