add some logic to increase buffer size even when initially zero

this should never happen, if a buffer has size zero, then trying to
increase its size by doubling doesn't work, so add some logic to make
the minimum non-zero size be CBUFFSIZE.

Signed-off-by: Russell Senior <russell@personaltelco.net>