wvariant: Allow getting string values a buffers

This allows client code to avoid conversions from w_buf_t to char* by means
of w_buf_str(), which may cause allocations when the buffer is empty and space
may need to be allocated to house the terminating '\0'.