1. If a try is scored with very little time remaining in the half (or the game), should there be a restart kickoff?
2. Similarly, if a penalty is awarded with little time remaining, can a team kick to touch and then have the lineout?
1. After a try is scored, time continues to run (up to the 90 second limit). The key factor is whether or not there is time remaining after the conversion kick has been taken.
If there is still time left after the conversion, then there will be a kickoff. Note that the scoring team has the option to forego the conversion, in which case if there is time remaining when they communicate that decision to the referee there will be a kickoff.
2. When a penalty is awarded with little time left and a team wants to kick to touch and have the lineout, the determining factor is whether or not they take the kick with time still remaining. If they take the kick before time expires then there will be a lineout.
In both cases, the relevant time is the moment when the ball is kicked.