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>