cachedb_mongodb: fix sorting results for mongo queries