A new analysis from the Pew Research Center found that the U.S. enjoys more favorable views than China in 24 countries, but in some areas, Beijing is outperforming Washington