Use weak_ptr instead of shared_ptr in particle.h

It solves the circular dependencies and fixes memory leakage
completely.