An alternating linearization bundle method for a class of nonconvex nonsmooth optimization problems