Use snprintf for resp hdrs, fallback to evbuffer_add_printf

Since evbuffer_add_printf() adds several steps to the evbuffer additions, we
first attempt to use a small stack buffer and snprintf to fill in the response
haeders, and if it fits, we just simply execute evbuffer_add().

If the snprintf fails (not enough space, for some reason), it will fallback to
the original evbuffer_add_printf()