strbuf_test: Cleaned up the code a bit.

Made golden_data arrays private to the respective function where possible and
removed "sdb_strbuf" from test names.
strbuf_test: Added some more tests.

Changed some test to be table-based and verify the result of the incremental
append test.
strbuf utils: Fixed resizing in append.

Previously, resizing happened "too early" which may possibly generate
avoidable memory churn.
strbuf utils: Added sdb_strbuf_cap().

This function returns the "capacity" of the string buffer. It's useful mostly
for testing, debugging, etc.
strbuf_test: Added some tests based on sdb_strbuf_cap().

These are mostly for checking memory handling.