Harnack inequalities and Gaussian estimates for a class of hypoelliptic operators