file_util.c: fix possible bad memory access in file_read_line_alloc()
In the case of a zero length string being returned by fgets(), the condition
checking for a trailing new line would perform a bad memory access outside
of `buf`. This might happen when line with a leading null byte is read.
Avoid this case by checking that the string has a length of at least one
byte. Also change the unsigned int types to size_t to store length values
while we're at it.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>