xlib_main: Add replay for three xlib calls

This patch adds replay for the following three xlib calls:
 - XAllocColor
 - XSetForeground
 - XSelectInput