fix TaskSetValue bug

- old version of TaskSetValue create out of memory access in some cases
- cleanup code of TaskSetValue
- delete virtual destructor of SuperCell