Update libngf client library.

Use proper version in pkg-config pc file and various small fixes to the library and example.
Similar code on error path here & elsewhere. Could _free_item() be used instead?