strbuf: factor out strlen out of appending
We have call-sites where we already know the length of the string, so calling strlen is entirely needless. So let's introduce a variant called strbuf_append_buffer that takes an explicit length, and make strbug_append call that instead.