Uniqueness and comparison principles for semilinear equations and inequalities in Carnot groups