G.D.P. in the United States rose more than expected. And despite a lackluster day, stocks ended the week with a second straight weekly gain.