Move pack/unpack routines in the linear_solver_batch

This is similar to the issue solved by !667 (merged) but in the linear eigensolvers.