St Mirren have agreed a deal with Newcastle to extend midfielder Conor Newton's loan until the end of the season, the club has confirmed.