Pakistan has spent the last year or so carefully building Washington’s confidence while maintaining a functional relationship with Tehran.