gold futures end at a three-week high