Write customized variables to separate file

Fix timing of .emacs after-init-hooks, they must run before the desktop
is restored (or restored buffers will not have our settings).