Improve query performance of optiq over mongo

Details

Description

optiq-mongo's aggregation framework pipeline could be optimized.

Queries like "select <projectItems> from < tableExpression> where < booleanExpression>" should let "where <booleanExpression>" (i.e. {$match:{...}}) go in front of "select <projectItems>" (i.e. {$project:{...}}). This could allow indexes to be used so that mongo doesn't need to scan the whole collection, which will very likely improve query speed.