gold ends up on inflation threat; copper rallies