Fix Python 3 hashing for Particle and decorators.