PAO: A general particle swarm algorithm with exact dynamics and closed-form transition densities