The Tree Particle-Mesh N-Body Gravity Solver