how are gold mines formed