refs #209 Add a test for the issue and implement the fix. We just need
to swap the start and end keys in prelockRange for reverse cursors.
Do a bit of refactoring around 'direction > 0' since it shows up a lot
and is better described as 'forward'.