Primes of the Form x2 + ny2: Fermat, Class Field Theory, and Complex Multiplication