Generalized maximum principle and evaluation of the first eigenvalue for Heisenberg-type operators with discontinuous coefficients