A Distributed Quasi-Newton Algorithm for Primal and Dual Regularized Empirical Risk Minimization