(#54) - fix startkey/endkey logic when descending

This commit ensures Couch-like behavior
for different combinations of startkey/endkey.