emulators/(mame|mess): Avoid name pollution with <stdio.h>
At least on DragonFly's base compiler (gcc 5.2), the getc and ungetc
routines in mame/mess were getting clobbered by <stdio.h>. Rename
getc and ungetc to mame_getc and mame_ungetc to fix. For some reason,
macro definitions did not work so I had to patch every instance
individually.