Gold hits record for second day as investors dump stocks