Gold hits record high as investors pile in to safe haven