Adaptive penalization in high-dimensional regression and classification with external covariates using variational Bayes