Implement Criteria API from doctrine/collection 1.1

Supersedes PR #584 from @bakura10.

 * Refactored QueryExpressionVisitor and tests
 * Added support for `Comparison::CONTAINS` (using non-anchored MongoRegex query)
 * Avoid extra sort/limit/skip calls in DocumentRepository::matching()