A-)It's a bit difficult to explain how to find the key of a guitar part on a forum. One thing you could do is load up a software instrument and try to play it on your keyboard while listening to it. Even if you don't play it perfectly, you will find that the musical phrase turns around a "tonic" note. Usually, the listener expects a musical phrase to end on the tonic... If you're not sure, fell free to post your guitar samples using [url]http://www.sendspace.com[/url] and I will tell you the keys of the guitar samples.
B-)You have a few choices in Logic. You could use "Factory > Time and Pitch Machine" in the local menu of the Sample Editor. You could also convert your loop into an appleloop using the appleloop utility.