gold futures end lower after record week