1. That is possible depending on what you mean by "still talking". You can only change the text chat when a chat button is clicked, by modifying Main.npcChatText to whatever string you want.
2. Like with above, this is only possible with buttons. You'll have to use this code:
Code:
Main.player[Main.myPlayer].talkNPC = -1;
Main.player[Main.myPlayer].sign = -1;
Main.npcChatCornerItem = 0;
Main.editSign = false;
Main.npcChatText = "";
3. First of all, GetChat is only called when you right-click the NPC to talk to it. Then, SetChatButtons is called every single tick the NPC chat window is opened. Not really sure why the source code is like that, but I'm not willing to rewrite how NPC chats are handled
The example mod has some examples: a town NPC, enemies, and a boss.