refs #683, a hack to not allocate cursor ids in queryWithQueryOptimizer unless
the cursor is being saved. For small queries, reduces contention on
ccmutex.