The privilege of the writ of habeas corpus shall not be suspended, unless, in cases of rebellion or invasion, the public safety require it.