Gold edges toward record high as Mideast war drives haven bids