Prince Charles has shaken hands with Northern Ireland's Deputy First Minister Martin McGuinness during a visit to St Patrick's Church in Belfast.