Use void* in most of Task API.

#832