Hermitian geometry of Lie algebras with abelian ideals of codimension 2