support $gte and $lte in JSON query

...and added tests about $gt, $lt, $matches, and $matchesCase