The Vortex State and Josephson Critical Current of a Diffusive SNS Junction