clean up for mesh2 source improvements et al

- cacheMap is accessed within the sync lock. It looks like that
would only ever manifest a problem in a NPE. That didn't occur
in testing, but better safe etc

- firstData / processing range re-implemented. It had been commented
out for convenience (it is pretty much unused). There is some more
explicit logic that makes it clearer what and when it is used for. I
kept it outside of the sync block, but changed the moreData variable
to volatile. This is kind of a hedge - it may not need to be volatile
because after all, setting firstDate to be not null isn't sync'd there
to begin with - I don't feel great about it being actually safe but that
is a problem for another time.

- some optimizations related to object creation. Fewer collections are
made, and more use initial capacity settings

- inverse lottery selection now takes a varargs param of primitive ints.
this helps a lot with the previous goal (collection creation), but also
makes it a bit simpler