configure.ac: readd missing test on "modern" utmp database

There was an incompatible change in struct utmp and the test to validate
if we are using the old or the new format has been removed in the
past decade somehow.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
lib/compat: move getutent/endutent implementation from utils.c

An ancient version of the compat library was present (and now rediscovered)
in utils.c, move it to its new home.

The inet_aton() implementation is coming in a separate patch.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afuser: factor utmp specific mess from the main body of the queue function()

Instead of doing a lot of ifdef trickery in the queue() function, use
separate static wrappers for that.

Also adds a locking around the use of the inherently non-thread-safe
utmp interface.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>
afuser: remove alarm workaround

The Linux kernel used to have a bug that caused the afuser driver
to block even if O_NONBLOCK is set in the open flags. It was fixed
a long time ago, and alarm() is incompatible with multithreaded programs,
thus get rid off the alarm() call to detect blocked ttys.

Signed-off-by: Balazs Scheidler <bazsi@balabit.hu>