The difference between a terrorist and a statesman is often quite subtle. The transformation can occur in the course of the signing of a treaty, with handshaking all round... Back in the days when the collapse of the Empire was occurring at the speed of a runaway train, plenty of former terrorists became heads of state, or if not then leading political movers and shakers. Look at Jomo Kenyatta, Michael Collins, Eamon de Valera.
All of the major political parties in Ireland, with the exception of Labour and the Greens, have their origins in the struggle for independence. Fianna Fail and Sinn Fein are the heirs of the republican mantle, while Fine Gael originated in the Pro Treaty/Free State side, with the addition of the very conservative Farmers Party and the Irish Fascists (the Blueshirts) thrown in along the way. But at one time the founding members were all (except the Farmers and the Fascists perhaps) the old IRA, IRB and Volunteers -- there was a plethora of pro-independence factions.
When you negotiate peace with a group of 'terrorists', you negotiate with the party that has the power to throw a spanner in the works and thus the mandate to negotiate, no matter how many armalites you suspect they may have in the boots of their cars parked outside. Hence the presence of Michael Collins at the negotiation table back in 1920/21 and the role of McGuinness and Adams in the Peace Process. There is absolutely no point in freezing out the most determined party from negotiations. For their part, Irish nationalists have always known that the party they need to sway is the Tories, whether in government or in opposition, because this is the party that has the closest links to the terrorists on the other side, the UVF, UDA, etc. You can't move forward unless you can present a solution that engages everyone in the process.
McGuinness was open to talking with the British from at least 1972 when he engaged in talks with William Whitelaw. He was first elected to the NI Assembly in Stormont in 1982. The allegations about his level of involvement with the Provos remain allegations -- there is no doubt that he has powers of persuasion over the membership of the Provos, or his role in the peace Process would have been in vain, but claims that he held any particular position in the IRA (including accusations from Irish politicians) have not been proven.