Lib: Save/restore state for linpools

Also change linpool.current ptr to really point to thr current chunk.
32 jobs for <span class="ref-name">int-new</span> in 8 minutes (queued for 7 seconds)
Status Job ID Name Coverage
  Image
passed #86230
dind allowed to fail
docker_centos-6-amd64

00:00:36

passed #86231
dind allowed to fail
docker_centos-7-amd64

00:00:34

passed #86220
dind allowed to fail
docker_debian-7-amd64

00:00:23

passed #86224
dind allowed to fail
docker_debian-7-i386

00:02:09

passed #86221
dind allowed to fail
docker_debian-8-amd64

00:00:23

passed #86225
dind allowed to fail
docker_debian-8-i386

00:00:23

passed #86222
dind allowed to fail
docker_debian-9-amd64

00:00:26

passed #86226
dind allowed to fail
docker_debian-9-i386

00:02:55

passed #86223
dind allowed to fail
docker_debian-testing-amd64

00:00:24

passed #86227
dind allowed to fail
docker_debian-testing-i386

00:03:07

passed #86228
dind allowed to fail
docker_fedora-25-amd64

00:00:29

passed #86229
dind allowed to fail
docker_fedora-26-amd64

00:00:39

passed #86232
dind allowed to fail
docker_opensuse-42_3-amd64

00:00:45

passed #86233
dind allowed to fail
docker_ubuntu-14_04-amd64

00:00:39

passed #86234
dind allowed to fail
docker_ubuntu-16_04-amd64

00:00:35

 
  Build
passed #86241
docker linux amd64
build-centos-6-amd64

00:01:01

passed #86242
docker linux amd64
build-centos-7-amd64

00:01:09

passed #86235
docker linux amd64
build-debian-7-amd64

00:01:06

passed #86246
docker linux amd64
build-debian-7-i386

00:00:47

passed #86236
docker linux amd64
build-debian-8-amd64

00:01:19

passed #86247
docker linux amd64
build-debian-8-i386

00:00:44

passed #86237
docker linux amd64
build-debian-9-amd64

00:01:14

passed #86248
docker linux amd64
build-debian-9-i386

00:00:53

passed #86238
docker linux amd64
build-debian-testing-amd64

00:01:28

passed #86249
docker linux amd64
build-debian-testing-i386

00:00:55

passed #86239
docker linux amd64
build-fedora-25-amd64

00:01:20

passed #86240
docker linux amd64
build-fedora-26-amd64

00:01:17

passed #86250
freebsd amd64
build-freebsd-11-amd64

00:04:11

passed #86251
freebsd i386
build-freebsd-11-i386

00:04:22

passed #86243
docker linux amd64
build-opensuse-42_3-amd64

00:01:12

passed #86244
docker linux amd64
build-ubuntu-14_04-amd64

00:01:26

passed #86245
docker linux amd64
build-ubuntu-16_04-amd64

00:00:40