Gold ends at more than 3-week high as U.S. equities, dollar decline