If the gülemek is "to laugh", how does the form of goodbye "güle güle" work? And is this the one where only the person staying says it and the person leaving says a different goodbye?
It's from Gülmek. The ...-e ...-e forms mean pretty much the same thing as the -erek, gülerek in this case. But don't walk around saying 'gülerek' to mean goodbye.
It's traditionally said by the one who stays behind, but it's no longer very strictly followed. I remember from years ago that a few of my friends puzzled my mother on different occasions when they said "güle güle" upon leaving. My mom was like... "errrrr.... what am I gonna say now?" ;p
It's a verb form meaning roughly "while ...-ing" or "...-ingly".
And as a greeting, it's short for something like "güle güle git", "go laughingly" -- a wish that the person who is leaving may have a happy trip.
I believe you can also use it in non-greeting contexts such as after a purchase ("may you wear that sweater you just bought laughingly" / "may you inhabit your new house laughingly").
I'm not sure about the answer to your second question, but I think that the person who leaves says "hoşça kal" stay well (or, a bit outdatedly / religiously, "allahaısmarladık / Allah'a ısmarladık" - I'm not sure what the literal translation of this is - perhaps "We have commended you to God"?) and the person who stays replies with "güle güle" (go) laughingly.