strbuf: always return a non-NULL value from strbuf_detach