how is gold form in the earth