Airports could be ordered to close and people detained on public health grounds under government plans.