Fix various little bugs and loosen up various warnings

Change-Id: Iead48ac030290290c7c448b6f72a31380c2e8326
diff --git a/third_party/libevent/buffer.c b/third_party/libevent/buffer.c
index 8510955..80a9e1b 100644
--- a/third_party/libevent/buffer.c
+++ b/third_party/libevent/buffer.c
@@ -1680,7 +1680,7 @@
 		} else if (chain->misalign) {
 			/* we can only fit some of the data. */
 			memcpy(chain->buffer,
-			    (char*)data + datlen - chain->misalign,
+			    (const char*)data + datlen - chain->misalign,
 			    (size_t)chain->misalign);
 			chain->off += (size_t)chain->misalign;
 			buf->total_len += (size_t)chain->misalign;
@@ -2749,7 +2749,7 @@
 	if (!chain)
 		return (-1);
 	chain->flags |= EVBUFFER_REFERENCE | EVBUFFER_IMMUTABLE;
-	chain->buffer = (u_char *)data;
+	chain->buffer = (const u_char *)data;
 	chain->buffer_len = datlen;
 	chain->off = datlen;