Controversial visit to shrine of Japanese war dead sparks tension with China