Add a variant of evhttp_send_reply_chunk() with a callback on evhttp_write_buffer()

evhttp_write_buffer() used by evhttp_send_reply_chunk() can take callback
executed when (part of) the buffer has been written. Using this callback to
schedule the next chunk avoids buffering large amounts of data in memory.
Allow registering callback for parsing HTTP headers

Slightly changed version of Espen Jürgensen's
commit 548141e72312126fa6121f6a5f436đ251c7fb1251 for forked-daapd.
Merge remote-tracking branch 'rbalint/from-forked-daapd'