Canadian marijuana grower Tilray and its early investors reached a deal that should prevent a flood of shares from hitting the market.