REFACTOR combine train_wrap and csr_train_wrap

The dense and sparse liblinear train wrappers were almost entirely identical. It seems as a result that `csr_train_wrap` missed out on #1857; and this refactored form would make implementing parameter changes like #1867 a little simpler.