Add base::make_task() helper function

The make_task() function makes creating tasks more convenient by
deducing the result type from the provided callable object.