maritz/nohm — pull request #73 by interruptz (2013-01-02 11:44:38+00:00)
Title: find() should use `ZREVRANGEBYSCORE` instead of `ZRANGEBYSCORE` when min>max.

Hello,
I faced problem with find() when min>max.

Here's the source code.
```
models.newsfeed_status.find(
{
'written_date': {
min: +since,
max: '-inf',
limit: 10
}
},
function(err, ids) {
console.log(ids);
}
);
```

On current version, It results `[]`.
I figured out that nohm uses only `ZRANGEBYSCORE`, and I think the proper action is using `ZREVRANGEBYSCORE` only when min>max.
And, to be fully functional, I implemented `endpoint` option to `find()`'s search parameter.

```
models.newsfeed_status.find(
{
'written_date': {
min: +since,
max: '-inf',
endpoint: '(]',
limit: 10
}
},
function(err, ids) {
console.log(ids);
}
);
```

It results properly in descending order.

`endpoint` is similar to mathematical expression of interval.
default value is `[]`.

Also I added a test case in `/test/findTests.js` for your convenience.
Please review this.