how gold is formed in the earth