* added gracefulQuit function

This creates an acid checkpoint, archives and closes the state when the
Quit button is pressed.
* removed checkpoint creation from dbLoop