San Francisco Giants beat Arizona Diamondbacks 4-1 in home opener