Nonpositive Curvature and the Ptolemy Inequality