Supporting cursor direction

ORDER BY was always ascending, ignoring the IDBCursor direction.