The secretary of state’s visit was the latest American effort to address a downward turn in the U.S.-India relationship.