Metis new query structure and operators

Summary: tests in separate diff

Reviewers: marcua

Reviewed By: marcua

Differential Revision: http://phabricator.locu.com/D3857