Forged by anti-Chinese attitudes and laws, these tightly knit communities brought both business opportunities and solace for immigrants.