macterm.c (mac_check_for_quit_char): Adding BLOCK_INPUT
around call to ReceiveEvent to avoid certain crashes.
(mac_draw_line_to_pixmap, XCreatePixmapFromBitmapData)
(mac_fill_rectangle_to_pixmap, mac_draw_rectangle_to_pixmap)
(mac_copy_area_to_pixmap, mac_copy_area_with_mask_to_pixmap):
Save/restore the current graphics port and device handle when
drawing into an offscreen graphics world.
image.c [MAC_OS] (XPutPixel, XGetPixel, image_load_qt_1)
(gif_load): Likewise.