add checkpoint/restore to the API

This adds support for the new checkpoint/restore API functions.