Store paused background state into settings

Fixes #220.