OnDemandList: Prevent errors when no rows are available
OnDemandList: Fix releaseRange logic to work in both directions

Also fixes an off-by-one error
Fix createAsyncStore so sub-collections are also async

This code is based on DeferredWrapper's, but uses declare to extend
instead of object delegation so that the prototype is carried over to
sub-collections.

Note that DeferredWrapper stores currently have the same problem;
we should likely change them to use createAsyncStore as well.
OnDemandList: Release ranges that are immediately discarded