Add tests against memory leaks in the C implementation of PVector