Unified batch friendly window pool factory

and some minor improvements to stats and toString() on InputEntities. Also
abstracted available memory calculations into its own class and has
LongArrayFactory.AUTO use that. So there are now mock tests around that
calculation and LongArray allocation.