ZEUS-2D: A radiation magnetohydrodynamics code for astrophysical flows in two space dimensions. III - The radiation hydrodynamic algorithms and tests