Pi and the AGM: A Study in Analytic Number Theory and Computational Complexity