Add new Task APIs.

Add Task, AsyncTask and SyncTask APIs. Task runs in a pure worker
thread. AsyncTask runs in a worker thread but synchronizes with the UI
thread asynchronously. SyncTask is like AsyncTask but synchronizes with
the UI thread synchronously.
Use new AsyncTask API.
Remove unneeded API.