libsmartcols: add table struct, cleanup refcounting

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: add table code

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: add test

[kzak@redhat.com: - refresh according to previous API changes]

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: support alternative streams

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: add SCOLS_FL_MAX

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: add reduce term width functionality

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: remove unnecessary code

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: add function to convert table to string

Note that open_memstream() is POSIX-1.2008, so it's possible than not
all libc have already implemented this function.

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: allow to read lines as tree

Signed-off-by: Karel Zak <kzak@redhat.com>