file_read_string(): Use NIH memory allocation.

Also drop trailing newlines.

Signed-off-by: James Hunt <james.hunt@ubuntu.com>
Associate allocated memory with message to ensure it gets freed.

Doc changes.

Signed-off-by: James Hunt <james.hunt@ubuntu.com>
Merge pull request #1 from jamesodhunt/nih-allocation-fixes-v2

Nih allocation fixes v2