Replace AC_CHECK_LIB with AC_SEARCH_LIBS in configure.ac.

AC_CHECK_LIB wasn't add -lX11 to LIBS properly.
Fix setitimer(2) usage.

For '-t' values >= 1000 the itimerval's timeval members weren't
getting set properly; using ITIMER_VIRTUAL/SIGVTALRM instead of
ITIMER_VIRTUAL/SIGVTALRM was making it ineffectual anyway.
Give --selectionTimeout meaning in --input mode.

Daemon simply exits after the specified amount of time.