darray: Add function to trim unused memory
endpoint: dramatically reduce memory usage

heelhook was holding on to memory way too aggressively. This change
implements some simple rules:

1. When a connection is closed, the read/write buffers are trimmed down
to init_buf_len

2. After a read or write, if the reserved size of the buffer is 2x the
current length, and the reserved size is greater than init_buf_len, trim
the buffer down to its current length.