util: rename write_one_line_file() to write_string_file()

You can write much more than just one line with this call (and we
frequently do), so let's correct the naming.
util: rename parse_usec() to parse_sec() sinds the default unit is seconds

Internally we store all time values in usec_t, however parse_usec()
actually was used mostly to parse values in seconds (unless explicit
units were specified to define a different unit). Hence, be clear about
this and name the function about what we pass into it, not what we get
out of it.
shared: rework env file reader

Implement this with a proper state machine, so that newlines and
escaped chars can appear in string assignments. This should bring the
parser much closer to shell.
fileio: write proper env var write-out code

This will properly escape all weird chars when writing env var files.
With this in place we can now read and write environment files where the
values contain arbitrary weird chars.

This enables hostnamed and suchlike to finally properly save pretty host
names with backlashes or quotes in them.
fileio: don't check for errors more often than really necessary