Ryan Reynolds and Rob McElhenney have sold a stake in Wrexham to a US investment firm.