HDFS-5642: correct passing of function pointers to pthreads.
HDFS-5642: introduce a typedef for thread procedures.