added ability to optimize getundispatched commits

Undispatched commits has the change of being extremely inneficient when
the number of aggregates is very high.   A minor option was added for
giving a threshold for how far to go back in history looking for
undispatched commits.