refactoring task scheduling logic

Task scheduling logic has been pulled up into BaseAggregator which is now an
abstract class. Subclasses are responsible for creating the Runnable tasks.