Northern Ireland international Conor McMenamin returns to the Irish Premiership, joining Coleraine from St Mirren on a long-term deal.