Move some back-endish routines from xboard.c to dialogs.c