Phase-preserving amplification near the quantum limit with a Josephson ring modulator