Add auto-dedup flag for checkpoint/restore

When doing incremental dumps is useful to use auto deduplication of
memory images to save space.

Signed-off-by: Nikolas Sepos <nikolas.sepos@gmail.com>
diff --git a/checkpoint.go b/checkpoint.go
index 788f334..d62816b 100644
--- a/checkpoint.go
+++ b/checkpoint.go
@@ -35,6 +35,7 @@
 		cli.BoolFlag{Name: "pre-dump", Usage: "dump container's memory information only, leave the container running after this"},
 		cli.StringFlag{Name: "manage-cgroups-mode", Value: "", Usage: "cgroups mode: 'soft' (default), 'full' and 'strict'"},
 		cli.StringSliceFlag{Name: "empty-ns", Usage: "create a namespace, but don't restore its properties"},
+		cli.BoolFlag{Name: "auto-dedup", Usage: "enable auto deduplication of memory images"},
 	},
 	Action: func(context *cli.Context) error {
 		if err := checkArgs(context, 1, exactArgs); err != nil {
diff --git a/restore.go b/restore.go
index ca9e1e8..7342f9d 100644
--- a/restore.go
+++ b/restore.go
@@ -82,6 +82,10 @@
 			Name:  "empty-ns",
 			Usage: "create a namespace, but don't restore its properties",
 		},
+		cli.BoolFlag{
+			Name:  "auto-dedup",
+			Usage: "enable auto deduplication of memory images",
+		},
 	},
 	Action: func(context *cli.Context) error {
 		if err := checkArgs(context, 1, exactArgs); err != nil {
@@ -123,5 +127,6 @@
 		ShellJob:                context.Bool("shell-job"),
 		FileLocks:               context.Bool("file-locks"),
 		PreDump:                 context.Bool("pre-dump"),
+		AutoDedup:               context.Bool("auto-dedup"),
 	}
 }