A UNIFIED TIMING AND SPECTRAL MODEL FOR THE ANOMALOUS X-RAY PULSARS XTE J1810−197 AND CXOU J164710.2−455216