Implement pause/resume feature

Enables pausing the game (!pause) in the PLAYABLE or PLAYED state. Stores state and timer information and restores it when the game is resumed (!resume).