The privilege of the writ of habeas corpus shall not be suspended; except by the General Assembly, in case of rebellion, insurrection or invasion, when the public safety may require it.