Cached ParticleFactories and ParticleFilters.
Fixes #8.