convert flow modify and aggregate stats to long running tasks

Reviewer: @kenchiang