cg_m added, template structure changed for linear solver
Merge pull request #1278 from lambday/feature/log_determinant

cg_m added, template structure changed for linear solver