Split out setting save/restore into helpers

This improves future maintenance in two ways:
- If we add a new export path (e.g., direct to clipboard), the new
  function can just call these helpers too.
- If we need to save additional settings, maktaba#value will make the
  save/restore logic more maintainable.
Save and restore 'background'

The 'solarized' colorscheme depends on the current value of the
'background' setting: there is a light and a dark version.  If we don't
save and restore 'background', users' colors can be different before and
after exporting HTML.

Fixes #6.
Closes #9.