Celtic negotiated a tricky second leg against Rosenborg with James Forrest's goal sending them through to the Champions League play-off round.