Support for ORDER BY DESC based on IDBCursor direction

ORDER BY was always ascending, ignoring the IDBCursor direction.