Whew! You ask questions that take a lot of answering.
Rather than answer your questions thoroughly, I'll give you a bit of a rough picture.
Then, I recommend you read the actual court opinions to get the actual law. I am not a lawyer. There is a link at the bottom to a resource thread with links to the cases.
One thing that is important to understand is that there is a difference between the law and strategy during a police encounter. Just because a fella thinks police cannot do such and such does not mean the fella is right. Get it wrong during a police encounter and you can get cited or arrested, depending on what you do.
There are varying strategies suggested here on this forum. Each has its advantages. I usually recommend complying while politely, verbally refusing consent. There are videos at the link below that explain how that works.
Here are the short answers.
Terry v Ohio does not prevent an officer from removing a gun during a detention; the case actually authorizes it.
Terry v Ohio does not prevent detention for mere lawful carrry. The closest approaches are the text quoted in Terry about the right to not be restrained or interfered with unless by clear and unquestionable authority of law. And, Florida vs JL where the court expressly declined to make a 4th Amendment exception for guns.