Fix query $and operator. Add query operator tests.