The secretary of state’s visit was the latest move in a U.S. effort to correct a downward turn in ties with India.