add checkpoint/restore to the API

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>