For decades, Canada's immigration policies were tailored to boost its population, fill labour gaps and settle refugees fleeing conflict from around the world.