Add own assert macro

Signed-off-by: Martin Milata <mmilata@redhat.com>
strbuf: use unsigned lengths, check for overflows

Fixes rhbz#1034869.

Signed-off-by: Martin Milata <mmilata@redhat.com>