Cleanup to allow building without-x.

This fixes the issue https://github.com/fontforge/fontforge/issues/414
by only prompting the user to save the font file if we have a GUI. If
it is on the command line only then we don't want to halt there and ask
the user because it might well be a script and not expecting this new prompt.

Ohter FD monitoring stuff is also handled without x. Note that the
background timers do not function without an X server around.