A very brief reply about double tonic tunes [every time I use that now- well-established term I wish I could think up another that better described what's going on]. Many bagpipe tunes are of this form - it's not a question of "one in A and another in G" - these tunes are 'in' both - take 'Seeking the Galloway' - you get a two-bar phrase with an 'A' tonality, followed by the same or similar phrase where one bar is in the 'A' tonality but the other is in a different tonality, in this case 'G', though in other tunes it might be B. There are other structures for putting these tonal 'units' together, a subject which Mat Seattle has discussed at length in several places, including article in past issues of Common Stock
This business of key signatures can't really be answered quickly, but I am working on a wee 'tutorial' which I hope will answer questions like yours. If you'd like to help 'test run' this, let me know and I'll send you the current draft.