Use tor_malloc_zero() in pt tests

Fixes for PT tests merged with 8402; patch from Yawning.