str: simplify heap string allocation
str: simplify heap string allocation

If we always determine the length of the string early during allocation, we
can drastically simplify the allocation code.

Signed-off-by: Josef 'Jeff' Sipek <a620f141433c70aa9e43778305a6c68cbfadfb25@josefsipek.net>

jeffpc/libjeffpc,jeffpc/libjeffpc,jeffpc/libjeffpc,jeffpc/libjeffpc