How and why did gold become money?