Safely handle some GDraw calls in headless mode.

A number of functions are unaware of the mode in which Fontforge is running and make GDraw calls or even, in graphical mode, which display to use (which GDraw handles in an internal global variable). This causes segmentation faults for functions such as Revert. (See issue #477 for more information.) The easy fix (presented here) is to have certain GDraw calls check for a NULL display.