The Labour Party could have made the case for a humane immigration system that treats refugees with dignity. Instead it has fanned the flames of racism and emboldened the far right.