Benchmark API tune-up
* implement onResubmit and onTaskContextFinished in benchmark API