Add stringbuf functions documentation, simplify entry allocation error handling.
Fix some lintian errors