libphenom: test and fix bufq ad-hoc size buf

Summary:
The bug was caused by calling `select_size` to determine which
of the pre-defined buffer buckets to use and passing the result down
to the buffer constructor, which itself calls `select_size`.

If the desired buffer to be appended is larger than 64k, we'll try to use a
single ad-hoc buffer that exactly matches the size to be appended.  In this
case, `select_size` will return zero.

When `select_size` is called with 0 as the size, it will pick a default size of
8192 bytes.  When calling `ph_bufq_append` with a len > 64k we actually end up
allocating 8192 bytes instead and end up writing only 8192 but recording the original size,
and subsequently read off the end of the buffer space :-(

In the environment where this was detected, ASAN didn't catch the invalid
memory accesses.

The resolution is to simply pass the length down to the buf constructor
function; the intermediate assignment to the `buflen` is not needed and is a
remnant of an earlier incarnation of this function.

Test Plan:
Added a unit test to verify memory integrity with a range of buffer sizes.

```
brew install concurrencykit  # or otherwise install locally
./autogen.sh
./configure
make check
```