Initial implementation of Snapshot/Restore API

Closes #3826