Pablo Sandoval homers as San Francisco Giants beat Milwaukee Brewers 5-3