Extracted batching from Couch and Mongo sinks to create a new PeriodicBatchingSink base class.
Use constant rather than -1 for infinite timer period.
Batching sink improvements - pump queue until empty; configurable timeout.
Partially lock-based concurrency in PeriodicBatchingSink.