The territory of California would prove invaluable as the discovery of gold unleashes the largest migration in US history and ignites a debate on slavery, culminating in the American Civil War.