write: change determination can user write to a terminal

Earlier test failed when user had write permission, but was not in
special group that owns terminal devices, usually tty.

This made write(1) to fail for root, if the root did not happen to be in
tty group.  In this commit root is granted ot write to anyone, even if
they have mesg(1) turned off.  For an user who is trying to write to own
other session the group write bit is significant only for whether mesg(1)
are enabled.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
lib/time-util: copy relative time parsing functions from systemd

The functions are copied nearly as-is.  Coding style has been modified to
match with util-linux project, while the functionality remains untouched.

CC: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
last: parse easy to use time formats

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
last: add --since time spec option

The --since and --until options are companions often needed together.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
docs: add --since and time option formats to last(1) manual

Signed-off-by: Sami Kerola <kerolasa@iki.fi>