updated glmnet learner: support factors, handle ncol(x) == 1