Fix memory leaks in task graph API

Write a simple destructor for TaskGraph class.  Task deserialization was not
freeing temporary buffers used to decompress data read - fixed.