Consolidated code for removal and extraction of particles.  This was motivated by, but not directly related to the issue with extraction of electrons from the electron cloud, see #28.