Nested Krylov methods for shifted linear systems